Skip to content

Commit

Permalink
fix: make toggling options re-render in playground (solid) (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
alanhoskins authored Oct 18, 2024
1 parent 52b6974 commit f0255d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion playground/src/renderer/solid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const createRendererSolid: RendererFactory = (options): RendererFactoryRe
const [lang, setLang] = createSignal(props.lang)
const [theme, setTheme] = createSignal(props.theme)
const [className, setClassName] = createSignal(props.class)
const [options, setOptions] = createSignal(props.options)

createEffect(() => {
watch(props, () => {
Expand All @@ -27,6 +28,7 @@ export const createRendererSolid: RendererFactory = (options): RendererFactoryRe
setLang(props.lang)
setTheme(props.theme)
setClassName(props.class)
setOptions(props.options)
})
})

Expand All @@ -38,7 +40,7 @@ export const createRendererSolid: RendererFactory = (options): RendererFactoryRe
class={className()}
lang={lang()}
theme={theme()}
options={props.options}
options={options()}
/>
</>
)
Expand Down

0 comments on commit f0255d2

Please sign in to comment.