Skip to content

Unsure hooks useRouteMatch are always called in the same order.

Antoine requested to merge ZeHiro/kresus:order-hooks into master

Setting WIP to add the eslint module : https://www.npmjs.com/package/eslint-plugin-react-hooks

Putting the hook in if (or after return triggered in if), make the order of called hooks indeterministic. This makes react raise. It can be observed by :

  • remove all accounts from DB
  • go to /initialize
  • force loading to /
  • check the browser's console

This MR ensures the hooks are always called in the same order.

Edited by Antoine

Merge request reports

Loading