Create a template
Remember the slug
context variable we passed in in gatsby-node? That's the $slug
we are querying with here!
See how we are getting the exact movie we want based on its unique slug? Then we can grab the data fields we want to render in our component. That component looks like this now:
Using Javascript destructuring we pull the data we named `movie` out and render the fields we want.
Wow, that’s a lot to take in, but if you get that pattern down alone, you are well on your way to building large sites with Gatsby. 💥
Last updated
Was this helpful?