Sharing Queries between back and frontend

At the moment, we have the following data flow:
 
  1. A filters panel is a react component
  1. Changing the filters panel changes the the end query that is sent to the API
  1. The API returns the data
 
What we would like:
  • Changing the filters changes the URL query
  • Changing the URL changes the filters
  • The URL query on the frontend is passed to the backend
  • The backend returns the results
 
 
Setting the URL
 
Workflow of Next Router
  1. Query is not ready, query is undefined
  1. Query is ready: loads the param
  1. The param is passed to the

Sharing Queries between back and frontend

At the moment, we have the following data flow:
 
  1. A filters panel is a react component
  1. Changing the filters panel changes the the end query that is sent to the API
  1. The API returns the data
 
What we would like:
  • Changing the filters changes the URL query
  • Changing the URL changes the filters
  • The URL query on the frontend is passed to the backend
  • The backend returns the results
 
 
Setting the URL
 
Workflow of Next Router
  1. Query is not ready, query is undefined
  1. Query is ready: loads the param
  1. The param is passed to the