You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// ./custom.store.tsimport{wrap,box,val}from"remini";exportconstCustomStore=()=>{constinitialState={address: {},user: {}};const$store=box(initialState);// example of performance optimization if store has a lot of often changes outside of "user" objectconst$user=wrap(()=>val($store).user);returnObject.assign($store,{getuser(){returnval($user);},// this will be enought for most casesgetaddress(){returnval($store).address;},// ... some methods where})}
And useful usage in everywhere in the code. React example:
Activity