Make your async components compact and descriptive by leveraging the power of the language features
PureComponent
for small optimizations16.2.0
shallowequal
dependency, decreasing the lib sizebabel-preset-env
instead of babel-preset-es2015
for building the libcontext
argument from coroutine signature (recommended to switch to the new Context API)Coroutine
is only an object with create()
factory method (breaking change for v2.0.0-alpha.2
)pkg.module
instead of jsnext:main
react
to peerDependencies
and update the range to ~16.2.0
getVariables
mechanismCoroutine.render
componentCoroutine
as a base React componentshallowequal
without lodash
dependency (–3kb of minified code)jsnext:main
instead of pkg.module
because of Webpack 2 issueshallowequal
instead of React's internal toolcontextTypes
for async functionspkg.module
property for bundling original sourcessetState()
for unmounted components