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

Problems using redux-form #13

Open
affemaen opened this issue May 17, 2017 · 4 comments
Open

Problems using redux-form #13

affemaen opened this issue May 17, 2017 · 4 comments

Comments

@affemaen
Copy link

I'm having problems adding redux-form(redux-form": "6.7.0") as a reducer. Tried it on react-boilerplate which the boilerplate is forked from and it works fine.

after adding

+import { reducer as form } from 'redux-form/immutable';
return combineReducers({
export default function createReducer(asyncReducers: Redux.ReducersMapObject = {}): Redux.Reducer<any> {
  const reducers = {
    route: routeReducer,
    global: globalReducer,
    language: languageProviderReducer,
    + form
    ...asyncReducers,
  };

  return combineReducers(reducers);
}

to reducers.ts

The error I'm getting
screen shot 2017-05-17 at 14 39 38

I've tried removing the react-hot-loader and different versions of redux-immutable

@StrikeForceZero
Copy link
Owner

Your snippet has some syntax issues

+import
+ form
return combineReducers({ export default

If you have an example repo I could take a look at that

@affemaen
Copy link
Author

My bad, it was supposed to look like a git diff.

Added an example repo https://github.com/affemaen/react-typescript-boilerplate

It combines the form reducer.

@StrikeForceZero
Copy link
Owner

Did you still need assistance with this? I should have time this weekend to look it over

@affemaen
Copy link
Author

Managed a workaround by setting and alias for immutable so that redux-form uses the correct import of immutable.

Seems to be issues with not using the latest version of react-hot-loader. Have to export the form as a prop for a workaround. I don't have access to the code at the moment but I'll post an example later if more people are having problems.

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

2 participants