Replace NgRX with NgXS
This requires some more research, but it appears to be much simpler to understand which should make it easier to bring new developers on board. This definitely requires less boilerplate code, but I haven't researched whether or not it will reduce our bundle size?
To Do:
- Compare the dependencies, does this reduce bundle size?
- If yes, implement NgXS to manage state
- Replace NGRX with NGXS
- Update documentation for how data flows through state
- Fix tests
Clean up state
app.state
- remove "rawUrl"
event.state
- combine "lastError" and "autoUpdateError", they are used in the same way
- add snackbar anytime a data load fails (currently just for autoupdate?)
- create a "request" object that has pertinent info in it? (isLoading, loaded, error)
currentFeatureId?: string;
events?: EventGeo;
request: {
isLoading: boolean;
loaded?: Date;
error?: any;
}
map.state
- do nothing
search.state
- combine with event state?
settings.state
- do nothing
ui.state
- Combine with app.state? Would be able to drop App.state entirely if we just pulled the params off the url to set state and no longer updated them.