Skip to content

Run query with refetch

Fanna Lautenbach requested to merge run-query-with-refetch into master
  • replaced 'useQueries' hook library with a simple axios group fetch returning a combined Promise
  • use a QueryContext to keep track of (grouped) query status which also combines data
  • replace useEffect/toggle with simple 'runQuery' function call on its correct triggers
  • remove 'canDoQuery' and replace with simple ternary on query status
  • add useMemo hook for the QueryResultsTable so it won't do unnecessary re-renders of the table

_Note: _after checking the renders with console.log statements everywhere, I can now conclude that the controllers actually work great and only trigger re-renders on the correct state changes with the changes here. Since there are dependent fields (for example: frequency range should change after deselecting an archive) within the SkyViewController, per request of our stakeholders, multiple re-renders on the menu component cannot be bypasses

Note2: don't forget an npm install if you want to run tests as some libraries have been added for testing purposes

Merge request reports