You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been playing around with Gridsome and have come to a fork in the road which from the Docs I have not found a solid / clear answer - maybe its implied, but not stated (or possibly I am being an idiot - this is also common)
Girdsome page names:
Can you set a page name to a page in gridsome?
i.e.
Why is this needed:
On the user clicking a component I use this.$router.push(name: X, props: { X: X}) to change the page
I pass an object as a prop to the new page
I did try to use the pages PATH instead of the name but it was unable to pass the prop when doing so
I can add the name manually to the routers.js file in the .temp folder - however if I add a new page - this is then wiped
Am I not using gridsome as it should have been intended? is there a way to add a name to a route?
Passing data to different pages
The above question has seemed from me needing to pass an object with data to different pages as a prop - but gridsome used GraphQL so is it intended that you use GraphQL on each page to get the data for that page and instead should not pass variables?
Any help on clarifying this would be great -
Thanks in advance -
W
The text was updated successfully, but these errors were encountered:
I realise this is a bit late to answer, but just for future reference the Gridsome discord community is a bit more active, and you may get a answer quicker there!
HI Guys,
I've been playing around with Gridsome and have come to a fork in the road which from the Docs I have not found a solid / clear answer - maybe its implied, but not stated (or possibly I am being an idiot - this is also common)
Girdsome page names:
Can you set a page name to a page in gridsome?
i.e.
Why is this needed:
On the user clicking a component I use
this.$router.push(name: X, props: { X: X})
to change the pageI pass an object as a prop to the new page
I did try to use the pages PATH instead of the name but it was unable to pass the prop when doing so
I can add the name manually to the routers.js file in the .temp folder - however if I add a new page - this is then wiped
Am I not using gridsome as it should have been intended? is there a way to add a name to a route?
Passing data to different pages
The above question has seemed from me needing to pass an object with data to different pages as a prop - but gridsome used GraphQL so is it intended that you use GraphQL on each page to get the data for that page and instead should not pass variables?
Any help on clarifying this would be great -
Thanks in advance -
W
The text was updated successfully, but these errors were encountered: