Create React App does not provide watching build mode oficially (#1070).
This script provides watching build mode for an external tool such as Chrome Extensions or Firebase app.
Create a React app.
Put the script into scripts/watch.js
.
export type PromiseType<T extends Promise<any>> = T extends Promise<infer U> | |
? U | |
: never | |
export type Arguments<T> = T extends (...args: infer U) => infer R ? U : never | |
export type ReplaceReturn<T, TNewReturn> = (...a: Arguments<T>) => TNewReturn | |
type Fn = (...args: any[]) => any | |
export type Go<E extends Error, T extends Fn> = { |
Create React App does not provide watching build mode oficially (#1070).
This script provides watching build mode for an external tool such as Chrome Extensions or Firebase app.
Create a React app.
Put the script into scripts/watch.js
.
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
class AccessibleMatch extends React.Component { | |
componentDidMount() { | |
this.node.focus() | |
} | |
render() { | |
const { component:Component, ...rest } = this.props | |
return <div ref={n => this.node = n} tabIndex="-1"><Component {...rest}/></div> | |
} | |
} |
{"users":[ | |
{ | |
"id":"4e663844e049bd3331000011", | |
"first_name":"User", | |
"last_name":"Number 7" | |
}, | |
... | |
] | |
} |
{ | |
"reviewables": [ | |
{ | |
"user": { | |
"id": "4e4c05b8e049bd2e83000007", | |
"first_name": "User", | |
"last_name": "Number 3" | |
}, | |
"mini_meet_id": "532895bd96ce8969e10001b1", | |
"submission_id": null, |
This post is also on my blog, since Gist doesn't support @ notifications.
Components are taking center stage in Ember 2.0. Here are some things you can do today to make the transition as smooth as possible:
Ember.Controller
instead of Ember.ArrayController
or Ember.ObjectController
Ember.Controller
, otherwise a proxy will be generated. You can use Ember.RSVP.hash to simulate setting normal props on your controller.class Api::RegistrationsController < Api::BaseController | |
respond_to :json | |
def create | |
user = User.new(params[:user]) | |
if user.save | |
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201 | |
return | |
else |