-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Closed
Description
React 16.2 added the concept of Fragments. I would like to be able to use Fragments inside Switch components to do things like this:
<Switch>
<>
<Route path="/" />
<Route path="/about" />
</>
<>
<Route path="/messages" />
<Route path="/messages/new" />
</>
</Switch>The application I am working on is composed by small modules and all those small modules are composed together in a single app based on some conditions. Since routes need to be direct children of Switch those small modules need to expose routes as an array. However using fragments would make it a lot simpler and more readable.
ernestopye
Metadata
Metadata
Assignees
Labels
No labels