noderaider / redux-idle-monitor

A Redux component to schedule events at stages of user idleness across multiple browser tabs.
https://noderaider.github.io/redux-idle-monitor/
MIT License
105 stars 9 forks source link

getting error on console in every mouse move and active status action never fired #8

Closed vivdkool closed 7 years ago

vivdkool commented 8 years ago

idle monitor state should have idle value: expected undefined to exist

i have setup my project as explained in readme :( can you help me quickly...

vivdkool commented 8 years ago

i able to come out the problem i have given reducer name something else instead of 'idle'. is will be not good to provide custom name to reducer.

vivdkool commented 8 years ago

i have one question how to handle browser refresh?

i am using redux persist to persist my store...

after browser refresh its stoped working

cchamberlain commented 8 years ago

Per original question: as of right now, the idle redux key is hard coded. It would be trivial to make it configurable if this is a real problem for anyone and is likely something I'll add in a future version either way. Please let me know if it is keeping you from using it.

Regarding browser refresh, I'm using this in a production app without any issues. I'm not sure why redux persist would cause it to not work on refresh, but I have not personally used that library.

vivdkool commented 7 years ago

i don't know why its not working for me but i made it to work by starting again when persist is done. i have another question i want to configured the time by making API call how we can do that is there any provision for that... ?

cchamberlain commented 7 years ago

You would have to set it up to not configure it until you've made that API call, or perhaps give it a default value and check to see if the API call value has returned yet. I'm on vacation ATM but I should be able to give an example next week if you need one.

cchamberlain commented 7 years ago

Closing, reopen if you have more questions.