Small library for the creation of interfaces based on web-components, only using functions and hooks, if you want to try Atomico and you need help tell me in Twitter Uppercod
Reviewed the example
The example shows how to create a counter, you can control the status of this
using the atomic given hooks, useObserver
allows controlling an already defined observable.
let [count = 0, setCount] = useObservable("value");
useObservable(observable:string):[value,Function]
extracts an observable defined as a static property of the functional WC, egWC.observable = {value: Number}
, setCount function is immutable, to maintain the memo optimization strategy.
If you want to maintain a private state you can use useState
or useReducer
.