Closed skortchmark9 closed 5 years ago
I was hoping to avoid a way to depend on the library for my own application bundle - this seems like it gets us most of the way there. Of course, it requires that you expose your selectors and state on the global object.
(function() { var script = document.createElement('script'); script.type = 'text/javascript'; script.src = "https://unpkg.com/reselect-tools/dist/reselect-tools.js"; document.head.appendChild(script); script.onload = () => { ReselectTools.registerSelectors(window.Selectors); ReselectTools.getStateWith(() => window.store.getState()); }; })();
I was hoping to avoid a way to depend on the library for my own application bundle - this seems like it gets us most of the way there. Of course, it requires that you expose your selectors and state on the global object.