Memo Context
The memo wrapper for React Context API
Installation
$ npm install memo-context
Example
Memo context avoids unnecessary re-renders by tracking the used properties.
; const formCtx = ; { const name setName = ; const surname setSurname = ; return name setName surname setSurname ;} //re-rendered only when name or setName changesconst Name = ; //re-rendered only when surname or setSurame changesconst Surname = ; { const form = ; return <formCtxProvider value=form> <Name /> <Surname /> </formCtxProvider> ;}