How to get or set the query string using React or Gatsby (without using document or window objects):
https://link.com/?color=#fff&theme=light
You can use this module for react
:
https://github.com/pbeshai/use-query-params
for gatsby
, you can use this plugin :
https://www.gatsbyjs.com/plugins/gatsby-plugin-use-query-params/
it'll wrap your app with QueryParamProvider