Skip to content

Commit 3a50cc3

Browse files
authoredOct 24, 2022
Add Solid to JSX section in Getting Started guide
Closes GH-2159. Reviewed-by: Titus Wormer <tituswormer@gmail.com>
1 parent 3e0ab23 commit 3a50cc3

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
 

‎docs/docs/getting-started.server.mdx

+27
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ your JSX runtime.
124124
* If you’re using **Theme UI**,
125125
install and configure [`@mdx-js/react`][mdx-react].
126126
Then wrap your MDX content in a `<ThemeProvider />`
127+
* If you’re using **Solid**,
128+
install [`solid-jsx`][solid-jsx].
129+
Set [`options.jsxImportSource`][options-jsximportsource] to
130+
`'solid-jsx'`.
127131

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

865+
#### Solid
866+
867+
<details>
868+
<summary>Expand example</summary>
869+
870+
```js path="example.js"
871+
import {compile} from '@mdx-js/mdx'
872+
873+
const js = String(await compile('# hi', {jsxImportSource: 'solid-jsx', /* otherOptions… */}))
874+
```
875+
</details>
876+
877+
Solid is supported when [`options.jsxImportSource`][options-jsximportsource] is
878+
set to `'solid-jsx'`.
879+
880+
See also [¶ Vite][vite] and [¶ Rollup][rollup] which you might be using, for
881+
more info.
882+
860883
### JavaScript engines
861884

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

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

901+
[solid-jsx]: https://github.com/high1/solid-jsx
902+
878903
[svelte-jsx]: https://github.com/kenoxa/svelte-jsx
879904

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

942967
[snowpack]: #snowpack
943968

969+
[solid]: #solid
970+
944971
[svelte]: #svelte
945972

946973
[themeui]: #theme-ui

1 commit comments

Comments
 (1)

vercel[bot] commented on Oct 24, 2022

@vercel[bot]

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.