vani-jsx-setup

Configure and use JSX with Vani while keeping runtime behavior explicit

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "vani-jsx-setup" with this command: npx skills add itsjavi/vani/itsjavi-vani-vani-jsx-setup

Vani JSX Setup

Instructions for enabling JSX with Vani and creating JSX-based components.

When to Use

Use this when a project wants .tsx files with Vani or needs a JSX example.

Steps

  1. Ensure tsconfig.json sets jsx to react-jsx and jsxImportSource to @vanijs/vani.
  2. Create a .tsx component using component and return JSX.
  3. Keep state in local variables and call handle.update() on events.
  4. Mount with renderToDOM as usual.

Arguments

  • tsconfigPath - path to TypeScript config (defaults to tsconfig.json)
  • componentName - name of the JSX component (defaults to Counter)
  • mountSelector - id for the root element (defaults to app)

Examples

Example 1 usage pattern:

Configure JSX and create a <button> counter that calls handle.update() on click.

Example 2 usage pattern:

Mix JSX components inside JS-first components using @vanijs/vani/html helpers.

Output

Example output:

Updated: tsconfig.json
Created: src/counter.tsx
Notes: JSX uses @vanijs/vani as jsxImportSource.

Present Results to User

Explain the JSX settings, highlight where explicit updates happen, and list the files changed.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

vani-forms-inputs

No summary provided by upstream source.

Repository SourceNeeds Review
General

vani-spa-setup

No summary provided by upstream source.

Repository SourceNeeds Review
General

vani-spa-app

No summary provided by upstream source.

Repository SourceNeeds Review
General

vani-scheduling

No summary provided by upstream source.

Repository SourceNeeds Review