lostintangent / spaces

Discover, share, and connect with developers across your favorite teams, classrooms and communities
https://aka.ms/vsls-spaces
MIT License
34 stars 3 forks source link

[WIP] Adopting Redux Start Kit #61

Closed lostintangent closed 5 years ago

lostintangent commented 5 years ago

This PR introduces a dependency on the redux-starter-kit, which includes a handful of helper APIs to reducer boilerplate. To begin with, I'm going to refactor all of our actions and action creators to use the createAction method, which allows us to have a single object that represents both the action name and creator.

Right now, this PR only refactors a single action, in order to illustrate the change. Assuming folks are cool with this change, I'll update the rest, which should dramatically simplify actions.ts.

In addition to this change, redux-starter-kit also provides helpers for simplifying your reducers, which I'll do in a follow-up PR.