Skip to content
Elijah Cobb edited this page May 13, 2021 · 3 revisions

The PUIApp component is required when using pstdl-ui. All components must be wrapped by a PUIApp somewhere up the component tree. A PUIApp manages the context of the global state and attaches a context provider from PUIContext. The PUIApp component just renders its children along with a PUIAppController inside of a PUIContextProvider

You do not need to worry about anything of the internals of a PUIApp. Just make sure you use it as a the parent to all pstdl-ui components.

import React from "react";
import ReactDOM from "react-dom";
import {PUIApp} from "./pstdl-ui";

ReactDOM.render(
	<PUIApp>
		<span>Hello, pstdl-ui!</span>
	</PUIApp>,
	document.getElementById("root")
);