We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello. Is it possible somehow to add Redux Store configuration, to be able to use this library with Redux? Thank you.
The text was updated successfully, but these errors were encountered:
Hi @evgeny-s! Have you tried simply wrapping your presentational component with react2angular?
Without seeing your code, it would look something like this:
let mapStateToProps = (state, ownProps) => ... let mapDispatchToProps = (dispatch, ownProps) => ... let FooWithRedux = connect( mapStateToProps, mapDispatchToProps )(Foo) let FooWithAngular = react2angular(FooWithRedux)
Please let me know if that works for you, or if you run into any issues.
Sorry, something went wrong.
The problem that we havn't Redux Provider wrapper in case of using components from Angular. I've added store manually like this:
export const connectWithStore = (WrappedComponent, ...args) => { const ConnectedWrappedComponent = connect(...args)(WrappedComponent); const store = configureStore({}); return (props) => ( <ConnectedWrappedComponent {...props} store={store}/> ); };
And now I using this connect function with store connected manually, since we can't wrap everything with
<Provider store={store}></Provider>
I've found this solution here: reduxjs/react-redux#390
bcherny
No branches or pull requests
Hello.
Is it possible somehow to add Redux Store configuration, to be able to use this library with Redux?
Thank you.
The text was updated successfully, but these errors were encountered: