onboarding updates #56
No reviewers
Labels
No labels
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
dependencies
Epic
good first issue
hacktoberfest
help wanted
icebox
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
priority: blocker
priority: high
priority: low
priority: medium
resilience
Tom's Wishlist
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
LBRYCommunity/lbryinc!56
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "onboarding"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -0,0 +15,4 @@export function userStateSyncMiddleware() {return ({ getState }) => next => action => {if (action.type === ACTIONS.CHANNEL_SUBSCRIBE ||you can write this as
[ACTIONS.CHANNEL_SUBSCRIBE, ACTIONS.CHANNEL_UNSUBSCRIBE, LBRY_REDUX_ACTIONS.TOGGLE_TAG_FOLLOW].includes(action.type)same for a similar check above
(it's not required or even strongly suggested to do the above, just sharing)
@ -0,0 +36,4 @@let newSubscriptions = subscriptions.slice();newSubscriptions = newSubscriptions.filter(subscribedUri => subscribedUri !== uri);newShape.shared.subscriptions = newSubscriptions;} else {I would keep this check explicit. You could also consider making this a
switch.Also, is there any way to have this fire after any reducers fire, so that you do not have to repeat the logic for each action that modifies the state?
I understand why you do not want a separate reducer for tracking shared state, but if you can have this function fire after reducers update redux state, then this logic becomes a lot simpler now and moving forward. All this function would need to do is re-select all user state and compare this state to the last previous known state.