implement
Implement/Introduction/Events

If you want your UI to update based on user interactions you will also need to know how to respond to events.

Events can be accessed from the component props object:

Button(
	{
		onClick: () => alert("Clicked!"),
	},
	"Click me",
);

Try it yourself!

index.ts
import { Button } from "@implementjs/core";

export default function App() {
	return Button("Click me");
}
Preview