0.0.3 • Published 2 years ago

@dhmk/atom-react v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@dhmk/atom-react

React bindings for @dhmk/atom

Install: npm install @dhmk/atom-react

API

observer(Component: T): T

Wraps either React's class component or functional component into observable component. Whenever an atom called inside render function is changed, the component will update.

<Observer>{() => ...}</Observer>

Observable component.

SSR

enableStaticRendering(enable = true)

Toggle atom observing.

isUsingStaticRendering(): boolean

Check atom observing status.