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

[Comment] Reusability aka Redux Dependency #260

Closed
ohager opened this issue Oct 5, 2016 · 5 comments
Closed

[Comment] Reusability aka Redux Dependency #260

ohager opened this issue Oct 5, 2016 · 5 comments

Comments

@ohager
Copy link

ohager commented Oct 5, 2016

This not a bug, nor a feature request...just a comment. Discussions are welcome.

I decided not to use this component due to fact, that it uses redux as dependency.
Don't get me wrong, Redux/Flux is an adequate architectural solution for managing application state.

IMHO a reusable component should isolate its behavior and should be agnostic to any architecture pattern. Using Flux to manage a components state is not a good design decision, as it

  1. breaks component isolation (how to deal with several mounted components?! - reinvent instance handling!)
  2. introduces boilerplate
  3. exposes implementation details

I cannot see any good reason why react-autosuggest uses redux.

Coincidentally, I wrote a post about it some months ago, because I tried to apply Flux to a custom suggestion input.

@Codii
Copy link

Codii commented Oct 15, 2016

I agree. Redux should not be coupled with this component.
It seems useless the way it is done, not even composable/modulable with other stores. Plus the dependency problem. You should probably get rid of it.

@thebigredgeek
Copy link

Yeah, and it causes a bug... redux.createStore is not a function etc etc. Not really sure why this design decision happened. Thinking about starting a fork @Codii @ohager

@thebigredgeek
Copy link

#296

@moroshko
Copy link
Owner

moroshko commented Jan 8, 2017

@ohager @Codii @thebigredgeek Thanks for your feedback!

redux and react-redux dependencies were removed in v8.0.0.

@moroshko moroshko closed this as completed Jan 8, 2017
@ohager
Copy link
Author

ohager commented Jan 11, 2017

You're welcome. Awesome Work.

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

4 participants