Once it gets to the template, it can pull from the URL to know which variables to display - for example, JavaScript or CSS related posts. I'm not actually making a folder called categories and filling it with a bunch of files like javascript.html or css.html, I just have one template and the router knows to direct to the proper template. The routes for these pages look something like this: If you go to /categories/javascript or /categories/css, you end up on a category listing page. If you go to /me, you're redirected to my about me page. (If you know what routing is, feel free to skip this section.)Įxample: If you go to, you end up on my home page. ![]() Routing is how a web applications direct traffic. React doesn't come with a built-in router, but we can easily achieve routing with the react-router-dom library.
0 Comments
Leave a Reply. |