-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
2.0.0-beta.4: Failed to execute 'appendChild' on 'Node' #2650
Copy link
Copy link
Closed
Description
Describe the bug
Rendering a DOM element stored in a reactive store crashes with "Failed to execute 'appendChild' on 'Node'" in Solid 2.0.0-beta.4, but works correctly in Solid 1.9.12.
Your Example Website or App
Steps to Reproduce the Bug or Issue
import { createStore } from "solid-js";
import { render } from "@solidjs/web";
export default function App() {
let [ state, setState ] = createStore<{
div: HTMLDivElement | undefined,
}>({
div: undefined,
});
setTimeout(() => {
let div = document.createElement("div");
div.innerText = "Hello World!";
setState((s) => { s.div = div; });
}, 1000);
return (<>{state.div}</>);
}
render(() => <App />, document.getElementById("root")!);
Expected behavior
The DOM element should render without errors, as it does in Solid 1.9.12.
Actual behavior
Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
Screenshots or Videos
No response
Platform
- OS: Ubuntu
- Solid-js version: 2.0.0-beta.4
- Browser: Chrome (latest)
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels