Refactor store methods to use the 'get' parameter from createStore callback #19
Labels
No Label
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
maintainability
performance
question
testing
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Klectr/KRadio#19
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
Directions
create store callback
This callback receives a
get
argument which we can use to grab the current state of the store Creating Store # 2086fec34be/src/hooks/stationStores.ts (L5)
add method
The former allows us to rewrite the
add
method and exclude that ugly set state callback we pass to it086fec34be/src/hooks/stationStores.ts (L6-L14)
rmStation method
This method has the same issue and should also utilize the
get
function086fec34be/src/hooks/stationStores.ts (L15-L23)
This should also allow us to remove the ts disable.