Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { createSignal } from "solid-js";
- import { render } from "solid-js/web";
- function A() {
- const [value, setValue] = createSignal(0);
- console.log("A");
- return <B value={value() + 1} onClick={() => setValue(value() + 1)} />;
- }
- function B(props) {
- console.log("B");
- return <button onClick={props.onClick}>{props.value}</button>;
- }
- render(() => <A />, document.getElementById("app"));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement