App is re-mounted when the system theme is changed,
but the connection to the sqlite database stays active.
This means the previous code would fail to initialize
and then be a blank screen.
Closes#107
If you are working through a plan, and accidentally
save an incorrect set (e.g. 100 reps instead of 10),
now you can long tap the item, and press edit. This
is slightly easier than swapping back over to the
home page to edit the set. Also since I reused the
same EditSet component this wasn't very much work.
Instead of using a context for the whole app
use DeviceEventEmitter with root state.
This will probably improve performance,
since I think the react context was
re-rendering the entire DOM tree.
Since we are swapping from the old system to this system
sometimes the columns will be already existing.
These errors failing are OK since we haven't changed
any column types before.
ERROR TypeError: Cannot read property 'getItem' of undefined
This error is located at:
in FlatList (created by SetList)
in RCTView (created by View)
in View (created by Page)
in Page (created by SetList)
in SetList (created by SceneView)
...
I found an open issue on the react-native github which seems
related https://github.com/facebook/react-native/issues/31523
but after following all of their suggestions I still have the
same error. I tried:
- Removing @babel/plugin-proposal-class-properties & @babel/plugin-transform-flow-strip-types
- Adding @babel/plugin-transform-flow-strip-types