code-annotation icon indicating copy to clipboard operation
code-annotation copied to clipboard

Refactor frontend routing

Open smacker opened this issue 8 years ago • 0 comments

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 Fragments should be generated automatically based on routes spec
  • [ ] custom code on top of redux-little-router should 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 routes spec)
  • extract custom code to separate folder/package which provides a limited interface. Then use it in the source code of the app

smacker avatar Feb 21 '18 15:02 smacker