STRML / react-router-component

Declarative router component for React.
http://strml.viewdocs.io/react-router-component
MIT License
874 stars 94 forks source link

Location always renders a div #206

Closed mikaelharsjo closed 6 years ago

mikaelharsjo commented 6 years ago

For styling reasons we wan't to avoid extra divs in the markup. <Location /> always renders a div. Would be nice to at least have the option to render <React.Fragment> instead.

STRML commented 6 years ago

Yes, Fragment is now an option. Accepting PRs.

jsg2021 commented 6 years ago

Locations (router) component accepts a component prop which you can set to null. The Location (routes) component renders the handler prop which you have total control of.

STRML commented 6 years ago

Ah yes. You're right that you can just pass the component and we have in fact done so in an app before without an issue. Coffee helps before commenting. Thanks for the note @jsg2021 and closing this as invalid.