3 ms·
Maybe I'm missing something, but there isn't any global state attached to window? They attach a constructor for state to the window, but that isn't the state it
by jy14898 2y ago
Maybe I'm missing something, but there isn't any global state attached to window? They attach a constructor for state to the window, but that isn't the state itself - it just returns a smart state object.
- atum47 2y agoconst 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.