![little do you know (remix) little do you know (remix)](https://images.genius.com/735f4e69f2289cdc143b04168376f984.640x640x1.jpg)
You can see it in root.tsx if you're curious.Īlright, you should have a a decent looking page with the posts on the left and a placeholder on the right. This allows Remix to merge all of your rendered routes links together and render them in the element at the top of your document. So let's get to it and provide some data to our component. Additionally, your routes are their own controller. It's progressive enhancement realized in its fullest.
#LITTLE DO YOU KNOW (REMIX) HOW TO#
If your background is a bit farther back than that with MVC web frameworks like Rails, then you can think of your Remix routes as backend views using React for templating, but then they know how to seamlessly hydrate in the browser to add some flair instead of writing detached jQuery code to dress up the user interactions. In Remix your frontend component is also its own API route and it already knows how to talk to itself on the server from the browser.
![little do you know (remix) little do you know (remix)](https://i.pinimg.com/736x/b5/e0/d4/b5e0d494c44cee8be0e132b4536f72f9--sierra-do-you.jpg)
If your web dev background is primarily in the last few years, you're probably used to creating two things here: an API route to provide data and a frontend component that consumes it. You might need to refresh the browser to see our new, bare-bones posts route. For now, find the Layout component and right after the link to "Home", add a new link to "/posts". We're going to make a new route to render at the "/posts" URL. This might happen if you've added ignore-scripts = true to your npm configuration or you're using pnpm or other package manager that does not automatically run postinstall scripts, which Remix relies on. Make sure the postinstall script runs before you start the app - if it does not, run it manually (e.g. If your application is not running properly at refer to the README.md in the generated project files to see if additional set up is required for your deployment target. If you want, take a minute and poke around the starter template, there's a lot of information in there. We're going to be doing some work with the file system and not all setups are compatible with the code in this tutorial. It is important that you pick Remix App Server