Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using store #28

Open
SquallLeoVIII opened this issue Jan 8, 2017 · 2 comments
Open

using store #28

SquallLeoVIII opened this issue Jan 8, 2017 · 2 comments

Comments

@SquallLeoVIII
Copy link

i seem to be having problems using store

i have exported my store

const store = createStore(reducer);
export default store;

and gave it this initial state(reducer has "state = initialState")
const initialState = Immutable.fromJS({
user: 'me',
});

now in my component in function stateFromStore i seem to be getting an uninitialized store
with user = undefined
not sure why.

@ynonp
Copy link
Collaborator

ynonp commented Jan 8, 2017

Things to check:

  1. store.getState() is returning the right value after creating the store
  2. store is passed as an attribute to Provider element wrapping the main component
  3. your component uses connect in the right way
  4. no errors in console

@vnovick
Copy link

vnovick commented Jan 8, 2017

@SquallLeoVIII, Can you please paste your store,reducer and component setup?
How did you connected your store to component? using react-redux's Provider and connect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants