When I generate a new application with one entity, I have this structure:
webapp
├── app
│ └── entities
│ ├── foo - CRUD front-end for the Foo entity
│ │ ├── foo-delete-dialog.tsx - Delete dialog component
│ │ ├── foo-detail.tsx - Detail page component
│ │ ├── foo-dialog.tsx - Creation dialog component
│ │ ├── foo.reducer.ts - Foo entity reducer
│ │ ├── foo.tsx - Entity main component
│ │ └── index.tsx - Entity main routes
│ └── index.tsx - Entities routes
To adapt this code to my needs, I copy and paste the entire folder app/entities/foo
to app/modules/foo
because I want to avoid conflicts while manipulating the foo entity with the generator. I fixed all import errors.
However, the app/modules/foo/index.tsx
file does not work the same way it works in app/entities/foo/index.tsx
. React-router not rendering components on route change. Please how to achieve this in a module folder the same way it's done in the entity folder?