Example app with Styled Components
This example features how to use Styled Components with Remix.
Open this example on CodeSandbox:
This example shows how to use Styled Components with Remix. Relevant files:
- app/root.tsx - This is where we render the app and if we're rendering on the server we have placeholder text of
__STYLES__
. - app/entry.server.tsx - This is where we render the app on the server and replace
__STYLES__
with the styles that styled-components collect. - app/routes/index.tsx - Here's where we use the
styled
function to create a styled component.