You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move Subscription Side Effect Out of Character Form Observable
The Character Form Observable has a side effect in it where the observable also handles writing to a file. We should move that code into a separate subscription function. The reset code that affects localStorage should also be moved out of this file.
Acceptance Criteria
Given I have an empty CharacterFormObservable State ({})
When a notification is performed
Then the localStorage value for the character form should be cleared.
Given I CharacterFormObservable notify function is called
When the localStoragePersistenceSubscriber is notified
Then the state should be persisted to localStorage.
Describe the solution you'd like
I'd like both of these solutions to be handled in the same subscriber. If the object is empty then localStorage should be cleared. In any other circumstance then the Observable state should be persisted in localStorage.
Describe alternatives you've considered
The alternative is leaving the side effect code in the existing observable as it is today.
Additional context
N/A
The text was updated successfully, but these errors were encountered:
Move Subscription Side Effect Out of Character Form Observable
The Character Form Observable has a side effect in it where the observable also handles writing to a file. We should move that code into a separate subscription function. The reset code that affects localStorage should also be moved out of this file.
Acceptance Criteria
Given I have an empty CharacterFormObservable State ({})
When a notification is performed
Then the localStorage value for the character form should be cleared.
Given I CharacterFormObservable notify function is called
When the localStoragePersistenceSubscriber is notified
Then the state should be persisted to localStorage.
Describe the solution you'd like
I'd like both of these solutions to be handled in the same subscriber. If the object is empty then localStorage should be cleared. In any other circumstance then the Observable state should be persisted in localStorage.
Describe alternatives you've considered
The alternative is leaving the side effect code in the existing observable as it is today.
Additional context
N/A
The text was updated successfully, but these errors were encountered: