The one drawback that I can speak to is not being able to
at a glance view all available routes and their respective components, this can be mitigated by making some descriptive comments, but it does increase the complexity of your route configuration. I would also try to keep nesting folders to minimum since there is cognitive load associated with getting the levels of nesting right in your import statements i.e
these can get out of hand if you have many nested routes.
The one drawback or con I've encountered with a similar structure is if/when things starts being used outside of it's hierarchy, then you have to use a lot of
../../.. in your imports.
For example, say that you get the requirement that on your StartPage route you should show the details for the most recent event.
so now it looks like:
routes ├─Events │ ├─New │ ├─Details ├─StartPage ├─ components // here somewhere you import ../../Events/Details
It's not the end of the world, but your nice hierarchy isn't quite as strictly hierarchical anymore.
- Fractal Project Structure with React and Redux - pros/cons
- Performance issues with a tree structure and shouldComponentUpdate in React / Redux
- Connecting a component with OwnProps using react redux and typescript in the .NET Core 2.0 reactredux template project
- What are the pros and cons on using React Context API with the useReducer() hook?
- Cannot read property '.then' of undefined when testing async action creators with redux and react
- Dealing with local state in react and redux
- Calling an action from a different reducer with React and redux
- Paginate date-specific results from an API with React and Redux
- the pros and const of react ssr with code splitting and now React.Lazy
- Typing redux forms v7 with TypeScript and React
- Multiple Registration Form with redux and react
- Async Image Load with React and Redux
- onEnter Transitions with React Router and Redux Simple Router Dont Render New Route's Component
- Sync queryParameters with Redux state and react router for function components
- How to test React Router params with Redux and enzyme
- How to add login authentication and session to ReactJS React Router and Redux with MongoDB + NodeJS Express?
- React redux connect with with styles and withrouter
- Import fonts to react project with webpack and styled components
- using react with redux and Getting error in redux '=' expected
- How to test redux state update with react testing library and jest
- Webpack 2 configuration for Tree shaking and lazy loading with System.import on React project
- React Redux folder structure for Fronted and Dashboard
- React lazy with TypeScript and Redux
- React router v4 with redux protected routes and auth
- React observable epic with Redux Toolkit and Typescript
- Project Structure for a CRA React Project with React Query
- redux react strategy with async data and interaction
- How to test a React component that has Router, Redux and two HOCs... with Jest and Enzyme?
- 3 legged OAuth with React and Redux
- Creating a (.NET 6 based) website project with ASP.NET Core and React (TypeScript) in Visual Studio 2022?
More Query from same tag
- Flexbox layout with two columns on desktop and one column on mobile
- react-router-dom route component requires page reload
- Where to put useDispatch and bindActionCreators in a project?
- How do I handle complex objects in ReactJS?
- What does Markup actually mean in JAMstack?
- infinite fetch data in useEffect in react.js
- How to override ant-design cechkbox to use font-awesome icon?
- Cannot stop player if use useState React Tonejs
- Accessing methods when using react-bodymovin to loop animation segments
- Why is the setstate not updating the value in ReactJs?
- How to decrease time using interval
- Select React Input
- How can I add a CORS header to this Lambda function
- Failed form propType: You provided a `value` prop to a form field without an `onChange` handler
- React Typed Children with TypeScript
- Problems with authentication flow in firebase app - after login, active user initially returns as null
- React: Button in Material Table Row needs to pass param to Edit modal
- Set component state, from unreachable variable
- How to execute a POST response content, that is an script tag, automatically in React?
- How to hide validation error in React Js upon updating the input field?
- How to use map function with react router?
- Return a map of components after adding data without pre initialising it
- How to type a custom React select component using TypeScript?
- React-testing-library: changes due to input
- Set the value of an input field on change of a field
- How to Change a css property based on a state of another component
- how to listen to page changes in nextjs
- Displaying multiple images using FlatList component in react native
- Style not applying on select tag in react application
- How to configure 'value' in the input field in React?