Closed AGMETEOR closed 3 years ago
Hey Allan. Just a heads up that this repo is technically frozen right now pending it being moved into the webapp with https://github.com/mattermost/mattermost-webapp/pull/7723.
Hey Allan. Just a heads up that this repo is technically frozen right now pending it being moved into the webapp with mattermost/mattermost-webapp#7723.
Hey Harrison, thanks for the heads up.
For the Epics themselves, we'd definitely be interested in discussing them with the web guild. I haven't looked into Epics myself, but we're actually going to be trying out Redux Sagas at some point since Jesse has previous experience with them. It sounds like they'll be able to fix similar problems too!
For the Epics themselves, we'd definitely be interested in discussing them with the web guild. I haven't looked into Epics myself, but we're actually going to be trying out Redux Sagas at some point since Jesse has previous experience with them. It sounds like they'll be able to fix similar problems too!
Yes. I think redux saga and redux-observable do the same thing.
@AGMETEOR mattermost-redux has been merged into the web app now, so you can feel free to resubmit this there.
Summary
Motivation Ticket 1 Motivation Ticket 2
Example 1
In Motivation Ticket 2, we had a bug caused by this flow. First, at boot time, if we had a cloud licence we would load
subscriptionStats
here. The bug occurred when, at boot time, the license was not cloud, and then later a user witches the license to cloud. This means there'll be components expecting to usesubscriptionStats
but they were not loaded. The components were nolonger working properly. To fix, we might have to go into each of the components and incompnentDidMount
oruseEffect
hook check whether the subscriptionStats exist and then fetch them.A more compact and predictable solution would be to listen to redux events and then react to them. In this demo PR, I use
redux-observable
library andrxjs
to listen toUPLOAD_LISENCE_SUCCESS
redux action and then as a side effect trigger fetching ofsubscriptionStats
if the uploaded lisence is a Cloud one.In Motivation Ticket 1, the solution was to listen to a webhook event and then update the data. This can also easily be solved with an appropriate epic.
Ticket Link
None