7 ms·
const appState = {...state} With that line I end up creating a appState inside the createState function which uses the state dictionary just as a template. Wo
by atum47 2y ago
const appState = {...state}
With that line I end up creating a appState inside the createState function which uses the state dictionary just as a template.
Would it be better if I attached the things I need to the state object that I receive?
function createState(state) {
state._update = () => ...
....
return new Proxy(state, ...)
}
legit question.