Skip to content

Commit

Permalink
docs: add steps to set up react-strict-dom (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
alitnk authored Jun 11, 2024
1 parent 65ba91a commit 8b3bad4
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Other setups may require extra steps to get StyleX working. For example, Remix r
- [SvelteKit](#sveltekit)
- [Vue](#vue)
- [Qwik](#qwik)
- [React Strict DOM (RSD)](#react-strict-dom-rsd)

#### Remix

Expand Down Expand Up @@ -111,6 +112,29 @@ Open the `src/global.css` file and add the following:
> [!NOTE]
> If you don't have a `src/global.css` file, create one and import it in your `src/root.tsx` file.
#### React Strict DOM (RSD)

Add an import source in your Vite config, like so:

```ts
import { defineConfig } from 'vite';
import styleX from 'vite-plugin-stylex';

export default defineConfig({
plugins: [
// ...other plugins
styleX({
importSources: [
{
from: 'react-strict-dom',
as: 'css',
},
],
})
]
})
```

#### Other Frameworks

It's possible that other frameworks don't work out of the box. If you find that this is the case, please open an issue.
Expand Down

0 comments on commit 8b3bad4

Please sign in to comment.