getflywheel / local-addon-instant-reload

Instantly Reload changes in your browser during development on a LocalWP site
11 stars 8 forks source link

feat: add redux toolkit and set up some basic patterns #1

Closed veryspry closed 3 years ago

veryspry commented 3 years ago

Summary

Set up Redux Toolkit so that we can easily leverage it during the actual code port process. Also sets up a few selectors based on what I think we will need.

Technical

In order to bind the store to the selector functions all while ensuring that the Typescript code will compile, this does introduce a pattern that isn't amazing to read and not the as clean as it could be. The benefit to doing it this way, is that we can theoretically iterate in one spot -- selectors.ts -- to clean this up without the need to touch any other files.