github solidjs/solid v0.23.0

latest releases: v1.9.3, v1.9.2, v1.9.0...
3 years ago

This release is mostly to support breaking change for TS users. JSX types no longer pollutes the global namespace. This means you need to update your projects to import it.

For users TS 4.1 or above add to your tsconfig to have JSX types in all your TSX files:

"compilerOptions" {
  "jsx": "preserve",
  "jsxImportSource": "solid-js",
}

Or mixing and matching? You can set JSX types per file using the pragma at the top of each file:

/* @jsxImportSource solid-js */

You can now import JSX types directly from Solid as neccessary:

import { JSX } from "solid-js";

For instance, to add a custom element you would:

import { JSX } from "solid-js";

declare module "solid-js" {
  export namespace JSX {
    interface IntrinsicElements {
      foo: CustomFooHTMLElementAttributes
    }
  }
}

Don't miss a new solid release

NewReleases is sending notifications on new releases.