Skip to content

Latest commit

 

History

History
 
 

styled-components

Example app with Styled Components

This example features how to use Styled Components with Remix.

Preview

Open this example on CodeSandbox:

Open in CodeSandbox

Example

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.

Related Links

Styled-Components