REACT-WITH-MEMO
What
Prevent unnecessary renders with ease!
Why
Managing your app state using context can cause a lot of unnecessary renders.
Using react-with-memo can help prevents most of them!
How
;; const Context = React; const Provider = { const name setName = React; const id setId = React; return <ContextProvider value= name setName setId id > children </ContextProvider> ;}; const withMemo = ; { return <p data-hook="id" onClick= >id</p>;}; const MemoId = ; { return <p data-hook='name' onClick= >name</p>;}; const MemoName = ; { return <Provider> // will only render when prop, id, or setId change <MemoId prop=0 /> // will only render when name, or setName change <MemoName /> </Provider> ;}