hydroxide-jsx
TypeScript icon, indicating that this package has built-in type declarations

0.9.0 • Public • Published

hydroxide-jsx

Type Definitions for Hydroxide's JSX

It contains Type Definitions for all HTML and SVG elements


Type Definitions

Attribute names are the same as HTML spec.

( They should not be camel-cased like how it is done in React )

This allows you to quickly copy any valid HTML and directly use it as JSX

( but you will need to self-close the void elements in JSX - <input> to <input /> - as that is required by JSX spec )


Attributes

'autoPlay' //  React
'autoplay' // HTML, Hydroxide

Event Handlers

Event Handlers have the on- prefix with event names being the same as browser event names.

They are not camel-cased like React to be consistent with browser event names.

'onClick' // React
'on-click' // Hydroxide

Special Attributes

These attributes are not part of HTML spec, instead, they have a special meaning in Hydroxide.

// creating reference to a DOM element
'ref'

// conditional rendering
'if'
'else'
'elseIf'

// two way binding
'bind-value'
'bind-checked'

Readme

Keywords

none

Package Sidebar

Install

npm i hydroxide-jsx

Weekly Downloads

0

Version

0.9.0

License

none

Unpacked Size

63.4 kB

Total Files

64

Last publish

Collaborators

  • manantank