Skip to content

Commit

Permalink
Add Solid to JSX section in Getting Started guide
Browse files Browse the repository at this point in the history
Closes GH-2159.

Reviewed-by: Titus Wormer <tituswormer@gmail.com>
  • Loading branch information
Djunnni committed Oct 24, 2022
1 parent 3e0ab23 commit 3a50cc3
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/docs/getting-started.server.mdx
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

1 comment on commit 3a50cc3

@vercel
Copy link

@vercel vercel bot commented on 3a50cc3 Oct 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

mdx – ./

mdx-mdx.vercel.app
mdx-git-main-mdx.vercel.app
mdxjs.com
v2.mdxjs.com

Please sign in to comment.