-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
When trying to run the following code I got an unexpected error:
import * as forgo from "forgo";
const App= () =>
new forgo.Component({
render() {
return <p>Tooltip</p>;
}
});
forgo.mount(document.getElementById("root"), <App />);forgo.min.js:520 Uncaught Error: The container argument to the mount() function should be an HTML element.
Now, because of the typing of mount(), this doesn't throw an error, though I'm not sure why.
export function mount(
forgoNode: ForgoNode,
container: Element | string | null
): RenderResult {
return forgoInstance.mount(forgoNode, container);
}null however is never a valid container because if (parentElement) will always return false.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels