flâneur

Yan Hehoku

0 followers · 266 views

on the atlas — 6

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 - RWieruch
  • Who is interested in this data? The fetching component should be a common parent component for all these components.
    How to fetch data in React - RWieruch
  • Some 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 – React
  • When 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 – React
  • You can pass an array into the value attribute, allowing you to select multiple options in a select tag:
    Forms – React
  • React, instead of using this selected attribute, uses a value attribute on the root select tag.
    Forms – React
  • In 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 | MDN
  • When using the same name for your properties, the second property will overwrite the first.
    Object initializer - JavaScript | MDN
  • Computed property names
    Object initializer - JavaScript | MDN
  • Shorthand method names
    Object initializer - JavaScript | MDN
  • Shorthand property names
    Object initializer - JavaScript | MDN
  • New notations in ECMAScript 2015
    Object initializer - JavaScript | MDN
  • In strict mode, autobinding will not happen; the value of this remains as passed.
    Classes - JavaScript | MDN
  • Static 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 | MDN
  • Static members (properties and methods) are called without instantiating their class and cannot be called through a class instance.
    Classes - JavaScript | MDN
  • An important difference between function declarations and class declarations is that function declarations are hoisted and class declarations are not.
    Classes - JavaScript | MDN