Component for stacking views
Library for facilitating view transitions.
Mounts components on top of each other in Z-order. Later elements on top. Children will be given 100% height and absolute positioning to allow you to customize transitioning.
``tsx
import { ViewStack } from "@pomle/react-viewstack";
enum View {
Home,
Settings,
}
function Component() {
const [view, setView] = useState(View.Home);
return (
This is your homepage
transform: view === View.Settings ? "none" : "translateX(-100%)",
}}>
This is your settings page