Skip to main content

Solid (TS)

Solid is a JavaScript framework for making interactive web applications.

Solid offers very similar syntax to React, with strong focus on reactivity using signals. Solid supports templating in 3 forms JSX, Tagged Template Literals and Solid's HyperScript variant, although JSX is the predominate form. Solid also supports TypeScript.

Demo

show code
import { createPlayground } from 'livecodes';

const options = {
"template": "solid"
};
createPlayground('#container', options);

Usage

For usage, see documentation for JSX and TypeScript support in LiveCodes.

Language Info

Name

solid.tsx

Extension

solid.tsx

Editor

script

Compiler

Official Solid JSX compiler (babel-preset-solid)

Version

babel-preset-solid version 1.7.4

Code Formatting

Using Prettier.

Custom Settings

Custom settings added to the property solid.tsx are passed to the Babel compiler during compile. Please check the documentation for full reference. In addition, the option disableAutoRender can be set to true to disable auto-rendering.

Please note that custom settings should be valid JSON (i.e. functions are not allowed).

Example:

Custom Settings
{
"solid": {
"disableAutoRender": true
}
}

Starter Template

https://livecodes.io/?template=solid