How to Get the Current Page URL in Gatsby
Updated: February 5, 2021Gatsby uses Reach Router under the hood to handle routing.
If you want to provide location
anywhere in your app, you need to use the React Router's Location Component.
Create a page inside the src/pages
folder:
Create a component inside the src/components
folder: