-
Notifications
You must be signed in to change notification settings - Fork 972
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
How to use react-router #1059
Comments
There is a lot of code to be copied to integrate with |
Using HOC breaks the styling. Example:
DecoratedListItem - has no hover effect. |
In that case, you are decorating a
|
I'm keeping this open to bring the example to the docs |
Thanks for prompt response.
See:
|
It looks more like a styling issue in the second case you mentioned. Check the code and add a className to expand the anchor in the whole container element. I'm curious about why the first one doesn't sound good to you. Think about |
Adding class or style to expand link does not solve the problem. Because anchor element is wrapped in spans that are not full width. Those spans come from ListItem. To make it full width I would need to create a custom Example:
Result:
|
I find creating new Selectable property is a presentation only feature (correct?). Maybe it could be solved by a simple css rule on the |
BTW, please take into consideration that simply decorating components breaks styling not only in
|
It is not breaking DRY if you wrap for component for every There are some components that set a context to its children and they manage them by injecting new properties or modifying them in some way. The case of The thing is that the I find a better solution for this cases to add a prop in the list so you can tell it with |
I'm actively working on the |
Hi, thanks for such a comprehensive answer. I get your concern. What is the perfect solution?
This way the P.S. |
One more thing. Please don't get me wrong. Thanks for react-toolbox :) It is the best library with material components I found. |
|
No problem @mendlik. The HOC actually is useful for the About the |
This will be taken into consideration for #1030. To integrate with react router you should be able to pass the |
I've been using react-router-redux and it works flawlessly for me, if you
need a working example let me know.
…On Thu, Apr 20, 2017, 9:42 PM Jonathan Parrish ***@***.***> wrote:
@NilsG-S <https://github.com/NilsG-S> We have an issue with React, Redux,
React-Router, React-Toolbox. Same issue with the Link. I was trying to find
the React-Toolbox-Test branch that you mentioned above and didn't see it.
In your master branch, it looks like you ditched React-Toolbox for Grommet.
Was this a better solution? Any direction you could point me towards would
be awesome. Bests, JP
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1059 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAnUA7itpIbG7q7OcSocL_BT9U4s2VS_ks5rx4PsgaJpZM4LO8UW>
.
|
I've also implemented a Link HOC, |
@devarsh Thanks for your HOC Using this, however, react-router-redux is not firing an event but my location changes. EDIT: Resolved my problem by updating my boilerplate to latest version |
How does one use react-router link in a listItem? I would expect what @mendlik posted above to work, e.g.:
but in doing so, the link appears to be ignored. Anyone have luck with this? |
Please could you specify how to use react-router with react-toolbox? It's related with #984 .
Seems that right now it's not possible without creating a lot of glue code. No way to setup the typical routing behavior for a Single Page Applications is a major drawback.
Possible solutions:
The text was updated successfully, but these errors were encountered: