Yan Hehoku
0 followers · 266 views
on the atlas — 6
- How to fetch data in React - RWieruch1 savers
- Composition vs Inheritance – React1 savers
- Forms – React1 savers
- Object initializer - JavaScript | MDN1 savers
- Classes - JavaScript | MDN1 savers
- *the-road-to-learn-react-chinese.pdf1 savers
highlights — 16
The loading indicator could be shown in the common parent component from the first criteria. Then the common parent component would still be the component to fetch the data.
How to fetch data in React - RWieruchWho is interested in this data? The fetching component should be a common parent component for all these components.
How to fetch data in React - RWieruchSome components don’t know their children ahead of time. This is especially common for components like Sidebar or Dialog that represent generic “boxes”. We recommend that such components use the special children prop to pass children elements directly into their output:
Composition vs Inheritance – ReactWhen you need to handle multiple controlled input elements, you can add a name attribute to each element and let the handler function choose what to do based on the value of event.target.name.
Forms – ReactYou can pass an array into the value attribute, allowing you to select multiple options in a select tag:
Forms – ReactReact, instead of using this selected attribute, uses a value attribute on the root select tag.
Forms – ReactIn ECMAScript 5 strict mode code, duplicate property names were considered a SyntaxError. With the introduction of computed property names making duplication possible at runtime, ECMAScript 2015 has removed this restriction.
Object initializer - JavaScript | MDNWhen using the same name for your properties, the second property will overwrite the first.
Object initializer - JavaScript | MDNComputed property names
Object initializer - JavaScript | MDNShorthand method names
Object initializer - JavaScript | MDNShorthand property names
Object initializer - JavaScript | MDNNew notations in ECMAScript 2015
Object initializer - JavaScript | MDNIn strict mode, autobinding will not happen; the value of this remains as passed.
Classes - JavaScript | MDNStatic methods are often used to create utility functions for an application, whereas static properties are useful for caches, fixed-configuration, or any other data you don't need to be replicated across instances.
Classes - JavaScript | MDNStatic members (properties and methods) are called without instantiating their class and cannot be called through a class instance.
Classes - JavaScript | MDNAn important difference between function declarations and class declarations is that function declarations are hoisted and class declarations are not.
Classes - JavaScript | MDN