It is maintained by Facebook, Instagram and a community of individual developers
Why Immutability Is Important... Immutability makes complex features much easier to implement... Detecting Changes
Contents
requirements[edit | edit source]
Code written in JSX requires conversion with a tool such as Babel before it can be understood by web browsers.
you can use JavaScript extensions like Flow or TypeScript to typecheck your whole application. But even if you don’t use those, React has some built-in typechecking abilities
installation[edit | edit source]
by Building react applications frameworks
practices[edit | edit source]
Flux: One-way data flow[edit | edit source]
Properties, a set of immutable values, are passed to a component's renderer as properties in its HTML tag. A component cannot directly modify any properties passed to it, but can be passed callback functions that do modify values. This mechanism's promise is expressed as "properties flow down; actions flow up".
Virtual DOM[edit | edit source]
Another notable feature is the use of a "virtual Document Object Model," or "virtual DOM." React creates an in-memory data structure cache, computes the resulting differences, and then updates the browser's displayed DOM efficiently. This allows the programmer to write code as if the entire page is rendered on each change while the React libraries only render subcomponents that actually change.
rendering[edit | edit source]
перейти на использование Reselect как можно скорее
Diff algorithm[edit | edit source]
React Fiber is a reimplementation of the React reconciler.
components[edit | edit source]
this.props and this.state may be updated asynchronously
props[edit | edit source]
By adding childContextTypes and getChildContext to MessageList (the context provider), React passes the information down automatically and any component in the subtree... Function components are also able to reference context if contextTypes is defined as a property of the function.
“key” is a special string attribute you need to include when creating lists of elements
React user events handling[edit | edit source]
styling[edit | edit source]
StyleSheet is a part of React Native, not a part of regular ReactJS. You can however instantiate a style object and use that like you would in RN
reactjs... no need for a special call to styleSheet.create because CSS is supported natively on the web.
metadata[edit | edit source]
[npm i -D prop-types ... to check, whether component props is receiving correct type data... Required... Default]
tools[edit | edit source]
debugging[edit | edit source]
standalone app for debugging React Native apps: Based on official Remote Debugger and provide more functionality. Includes React Inspector from react-devtools-core. Includes Redux DevTools, made the same API with redux-devtools-extension. Includes Apollo Client DevTools
Flipper[edit | edit source]
Hmr[edit | edit source]
React Native supports hot reloading natively as of version 0.22. Using React Hot Loader with React Native can cause unexpected issues (see #824) and is not recommended.
difference between Live Reload (current) and Hot Reload (new).
React-Hot-Loader is expected to be replaced by React Fast Refresh... React Native - supports Fast Refresh since 0.61. parcel 2 - supports Fast Refresh since alpha 3. webpack - no support yet, use React-Hot-Loader
Demos[edit | edit source]
playgrounds[edit | edit source]
- https://snack.expo.io
- github import
- http://Repl.it
- many languages, multiplayer
- Replit... partnered with our friends at Expo to create a React Native environment
- CodeSandbox
- no React Native
other[edit | edit source]
rnplay.org is shutting down on April 1st, 2017. It's been replaced by https://sketch.expo.io
Subcategories
This category has the following 5 subcategories, out of 5 total.
B
R
Pages in category "React"
The following 4 pages are in this category, out of 4 total.