Commit Graph

4 Commits (fe357e530dc482b5338a59a9e74a36727797252c)

Author SHA1 Message Date
Travis Ralston e4835c4b03 Demonstrate dis.fire() with view_user_settings
Like a5f3318f3b, this proves that the new dispatcher conversion works for fire-and-forget style dispatches too. This is another obvious-if-broken and generally safe conversion to make.

Other actions which can be dispatched this way have been excluded for reasons mentioned in the Action enum's comments.
2020-05-13 21:08:08 -06:00
Travis Ralston a5f3318f3b Convert view_user dispatch to prove the conversion works
This is a relatively obvious dispatch action that doesn't require a lot of complicated type definitions, so should be a good candidate to prove the thing works. If for some reason the thing stops working, we've done something wrong.

This also adds a bit of generic types to the dispatch call so we don't confuse the tsx parser by using `dis.dispatch(<ViewUserPayload>{...})` as it thinks that's supposed to be a component. We still get type safety, and the thing remains happy with the generics approach.
2020-05-13 21:07:50 -06:00
Travis Ralston 8c72c27da9 Break out actions and payloads to their own files
The definitions take up a lot of space which makes it hard to see the dispatcher class, so break them out.
2020-05-13 21:07:50 -06:00
Travis Ralston 90a898d03f Move dispatcher into a subdirectory
We're expecting to have a whole bunch of types for the dispatched payloads, so pull the thing into a directory we can throw them in.
2020-05-13 21:07:50 -06:00