joystick
joystick copied to clipboard
Add a caches object to component options
Building an SPA and I'm trying to depend on a cache.get() call in my render. Technically this works, but it doesn't trigger a re-render. Components should have an optional caches property that can be set like this...
const App = ui.component({
caches: {
app: cache('app'),
},
...
});
The idea being that internally, Joystick can listen to the on('change') handle and trigger a re-render of the component whenever this updates. Might be a little messy so may want some way to configure it, but would come in handy as the only alternative at the moment is copying global state over to local state 😢.