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
Is your feature request related to a problem? Please describe.
We have a collection store and a variable store. The first has a full collection in it, including collection variables, environments and all requests etc. The latter is responsible for temporarily modifying collection variables. Both are ultimately modifying the same data (collection variables). This is bad.
Describe the solution you'd like
Since the variable store is basically included in the collection store, we should consolidate them. The simplest solution would be:
Create a setVariables(variables: VariableMap) method in the collection store which overrides/sets the variables property of the collection
Move the functionality of the variable store into the state of VariableTab (temporarily adding variables, modifying them etc.). Only save() needs to call the new setVariables() action on the collection store
Describe alternatives you've considered
Instead of making VariableTab stateful, I considered moving the methods into collection store. This will bloat the store with methods which are only used by the VariableTab. I don't like this alternative :D
Additional context
Zustand is a monolithic store library. The provided solution is compliant to that.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
We have a collection store and a variable store. The first has a full collection in it, including collection variables, environments and all requests etc. The latter is responsible for temporarily modifying collection variables. Both are ultimately modifying the same data (collection variables). This is bad.
Describe the solution you'd like
Since the variable store is basically included in the collection store, we should consolidate them. The simplest solution would be:
setVariables(variables: VariableMap)
method in the collection store which overrides/sets thevariables
property of the collectionVariableTab
(temporarily adding variables, modifying them etc.). Onlysave()
needs to call the newsetVariables()
action on the collection storeDescribe alternatives you've considered
Instead of making
VariableTab
stateful, I considered moving the methods into collection store. This will bloat the store with methods which are only used by theVariableTab
. I don't like this alternative :DAdditional context
Zustand is a monolithic store library. The provided solution is compliant to that.
The text was updated successfully, but these errors were encountered: