Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Solid to JSX section in Getting Started guide #2159

Merged
merged 3 commits into from
Oct 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/docs/getting-started.server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ your JSX runtime.
* If you’re using **Theme UI**,
install and configure [`@mdx-js/react`][mdx-react].
Then wrap your MDX content in a `<ThemeProvider />`
* If you’re using **Solid**,
install [`solid-jsx`][solid-jsx].
Set [`options.jsxImportSource`][options-jsximportsource] to
`'solid-jsx'`.

Other JSX runtimes are supported by setting
[`options.jsxImportSource`][options-jsximportsource].
Expand All @@ -134,6 +138,7 @@ For more info on the aforementioned tools, please see their dedicated sections:
[¶ Emotion][emotion],
[¶ Preact][preact],
[¶ React][react],
[¶ Solid][solid],
[¶ Svelte][svelte],
[¶ Theme UI][themeui], or
[¶ Vue][vue].
Expand Down Expand Up @@ -857,6 +862,24 @@ for context based component passing.
See also [¶ Vite][vite] and [¶ Vue CLI][vue-cli], which you might be using,
for more info.

#### Solid

<details>
<summary>Expand example</summary>

```js path="example.js"
import {compile} from '@mdx-js/mdx'

const js = String(await compile('# hi', {jsxImportSource: 'solid-jsx', /* otherOptions… */}))
```
</details>

Solid is supported when [`options.jsxImportSource`][options-jsximportsource] is
set to `'solid-jsx'`.

See also [¶ Vite][vite] and [¶ Rollup][rollup] which you might be using, for
more info.

### JavaScript engines

#### Node.js
Expand All @@ -875,6 +898,8 @@ See their readmes on how to configure them.

[@next/mdx]: https://github.com/vercel/next.js/tree/canary/packages/next-mdx

[solid-jsx]: https://github.com/high1/solid-jsx

[svelte-jsx]: https://github.com/kenoxa/svelte-jsx

[jsx]: #jsx
Expand Down Expand Up @@ -941,6 +966,8 @@ See their readmes on how to configure them.

[snowpack]: #snowpack

[solid]: #solid

[svelte]: #svelte

[themeui]: #theme-ui
Expand Down