π¨ Jwc.js is a JavaScript framework for using JSX to write web components on the web.
π§ͺ Working in Progress
After the following tasks are completed, we will publish Release v0.1.0.alpha.0
- Data Reactively
- Inject style
- JSX TypeScript Support
-
<Fragment />
Support - Vite Fully Support
- Function Component Support
npm i @jwcjs/core
import { JwcComponent, Component } from "@jwcjs/core";
import { h } from "@jwcjs/runtime";
import style from './App.css'
@Component({
name: "app-element",
css: style
})
export class App extends JwcComponent {
@Props()
hello: string
public override render() {
return (
<div>
<h1>Hello World</h1>
<span>{this.hello}</span>
</div>
)
}
}
import { registerFunctionComponent } from "@jwcjs/core";
import style from './App.css'
export function App() {
useStyle(style)
const [hello, setHello] = useState<string>("Hi")
return (<></>)
}
registerFunctionComponent("app-element", <App />);
AkaraChen π» |