code-annotation
code-annotation copied to clipboard
Refactor frontend routing
Initially, frontend routing was implemented only for 2 pages without clear vision what would be required later (like permission checks).
Now when we have ~10 pages already, it works but requires too much boilerplate copy-past code. We need to improve it.
As a minimum to implement here:
- [ ] router
Fragmentsshould be generated automatically based onroutesspec - [ ] custom code on top of
redux-little-routershould be covered by unit tests
Few more ideas:
- make research on existing libs once again, maybe I missed something that fits our needs the first time
- simplify router middlewares (as an options remove them completely and replace by one middleware with rules provided by
routesspec) - extract custom code to separate folder/package which provides a limited interface. Then use it in the source code of the app