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
The app currently has one counter, it would be super-cool to have multiple ones (for more complex state). I'm thinking the UI could be a table view with a UIStepper as each cell's accessory view. A first-pass implementation would tableView.reloadData on state updates, a more performant approach could be researched and implemented after that.
For the list of views I can think of some options:
Your suggestion: UITableView + reloadData is probably the simplest way to go.
With some additional state-diffing (checking which cells got added, removed updated) you could use a React-like wrapper around UITableView. You could take a look at the AutoTable repo, where I've implemented something similar. I believe there are a bunch of other table view diffing libraries out there, i.e. RxDataSources.
State-diffing together with UIStackView. Keep reference to existing views, update individual existing views as state updates come in. Add/remove views from UIStackView as needed.
If you want to build something on your own that requires state-diffing, you can take a look at Dwifft, a simple diffing library that I found pretty useful.
The app currently has one counter, it would be super-cool to have multiple ones (for more complex state). I'm thinking the UI could be a table view with a
UIStepper
as each cell's accessory view. A first-pass implementation wouldtableView.reloadData
on state updates, a more performant approach could be researched and implemented after that.See ReSwift#7
The text was updated successfully, but these errors were encountered: