ignite icon indicating copy to clipboard operation
ignite copied to clipboard

reducerVersion doesn't seem to work

Open lukabers opened this issue 10 years ago • 8 comments

Hiya! So you think it's broken or missing a feature eh?

Welllllll, it just might be. Do me a favor and check the following.

  • [ ] Issue does not already exist
  • Identify exactly what aspect your issue is about
    • [X ] ignite base application
    • [ ] ignite the cli
    • [ ] ignite generated code
Computer
  Platform: darwin

Ignite
  Version: 1.5.0
  Path: /usr/local/bin/ignite

Node
  Version: v6.2.0
  Path: /usr/local/bin/node

NPM
  Version: 3.8.9
  Path: /usr/local/bin/npm

Yeoman
  Version: 1.8.4

React Native CLI
  Version: 1.0.0

App
  React Native Version: 0.31.0

Hello, we just installed a fresh ignite app and removed the login reducer from the persistent store blacklist. After some updates to the state of the loginReducer we tried to change the reducerVersion to force a fresh store but it doesn't seem to work. It enters in the rehydrationServices, it compares the version and executes the persistentStore(store,config) and his callback but never update the redux state to a fresh one.

I know there is a problem with the startup action but i can also remove this action from root.js and the problem still persists...

Any suggestion? Thanks.

lukabers avatar Aug 27 '16 13:08 lukabers

@fvonhoven - are you planning on taking a look?

GantMan avatar Aug 27 '16 17:08 GantMan

Maybe part of the problem is expectation.. When i change the reducer version, i'd expect to lose all of my data and start fresh which isn't the case

An example of where this would be helpful is when i get bad data into my store. I want to reset the store but have no way to do it. In dev i ended up resetting the simulator instead.

This feels like something changing the reducer version should do.

leesolway avatar Aug 30 '16 18:08 leesolway

Changing the reducer version should do that. @fvonhoven is going to check into this and give us an update.

GantMan avatar Aug 30 '16 22:08 GantMan

Thanks you, we will wait!

lukabers avatar Aug 30 '16 23:08 lukabers

PR submitted!!!!

fvonhoven avatar Aug 31 '16 15:08 fvonhoven

fixed in latest PR #339

GantMan avatar Aug 31 '16 16:08 GantMan

I think you can close, it works now!

lukabers avatar Sep 08 '16 16:09 lukabers

excellent!

GantMan avatar Sep 08 '16 16:09 GantMan