Skip to main content
Push signalsPush signals

Getting started

Installation

Core library

npm install signia

React bindings

signia has no dependencies, and is useful outside of react applications. However if you wish to use it in a react app, we have officially-supported bindings available.

note

These bindings do not currently work with legacy class components. We may be willing to add and maintain legacy support if there is sufficient demand. Let us know!

npm install signia-react

Automatic component tracking

If you wish to enable tracking on all functional components automatically, run:

npm install signia-react-jsx

And then make your tsconfig.json include these properties:

{
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "signia-react-jsx"
}
}
Vite

If you are using Vite, you will need to add jsxImportSource to your vite.config.ts:

import react from '@vitejs/plugin-react-swc'
import { defineConfig } from 'vite'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react({ jsxImportSource: 'signia-react-jsx' })],
})

Next: Read the tutorial

The Using Signals Tutorial will walk you through the basics of using signia in an application.