-
Notifications
You must be signed in to change notification settings - Fork 27
Style
Lou Huang edited this page Oct 22, 2016
·
1 revision
Functions that handle events should be named using the format on[Event][Context] where [Event] is the name of the event and [Context] is an optional descriptor of where the event handler is applied or what it is handling. For instance, an event handler named onMouseOverColorBox means a function that handles the onMouseOver event for a color box.
Functions that are invoked in response to asynchronous tasks, such as callbacks, should be named by prefixing the function name with the word handle, e.g. handleSuccessResponseFromServer. Do not use on (as in onSuccessResponseFromServer) — reserve those for interaction events supported by React or by the browser.
- Use the latest available active LTS version (as of this writing, Node 4.x).
- When installing or upgrading dependencies, always use the package's exact version. (e.g
npm install --save-exact) This is also enforced with.npmjs