Skip to content

Latest commit

 

History

History
25 lines (13 loc) · 560 Bytes

README.md

File metadata and controls

25 lines (13 loc) · 560 Bytes

@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.