npm install rxjs-react
// ES2015 // Commonjsconst reactive =
Table of Contents 👇
Motivation
React Suspense
is a great new feature in react
, it supports writing async code in render function
without async/await
syntax, and making data-fetching
, loading
and code-spliting
become easier and simpler.
What if we go further?
Put observable(rxjs
) in render function
.
const App =
Usage
reactive element
ReactElement
can be reactive.
const app =
reactive props
Props
can be reactive.
const Count = <h1>count propscount from reactive props</h1> const app =
reactive component
ReactComponent
can be reactive.