redux-async-initial-state icon indicating copy to clipboard operation
redux-async-initial-state copied to clipboard

Initial state not loaded immediately

Open olivierpascal opened this issue 7 years ago • 4 comments

I currently use store.dispatch({ type: '' }); just after createStore() as a workaround to make STATE_LOADING_START dispatched asap but it's quite ugly. Is it the expected way to do this?

olivierpascal avatar Oct 11 '18 18:10 olivierpascal

@olivierpascal, use redux^3.7.2 and redux-async-initial-state^0.2.2

oleksii-b avatar Dec 04 '18 23:12 oleksii-b

Any update on this? I had the same problem and adding store.dispatch({ type: '' }); fixed the problem but i don't like it. I use redux 4.0.5 and redux-async-initial-state 0.3.0.

ruckk avatar Feb 16 '20 17:02 ruckk

Same problem here.

Nobody fix it yet?

josegoval avatar Sep 09 '20 11:09 josegoval

I also faced the problem. Apart from what have been said, I can add that using more meaningful action type (for example, 'START-REDUX-ASYNC-INITIAL-STATE') can help understand the intention later:

store.dispatch({ type: 'START-REDUX-ASYNC-INITIAL-STATE' });

Also, if you are using electron-redux, you can add meta: {scope: 'local'} to not flood main process:

store.dispatch({ type: 'START-REDUX-ASYNC-INITIAL-STATE', meta: {scope: 'local'} });

MaximKalinin avatar Jan 21 '22 15:01 MaximKalinin