Last active
July 22, 2024 22:30
-
-
Save oshell/575d19a10c78e5085c6548c994cc69ce to your computer and use it in GitHub Desktop.
pullstate read store example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react"; | |
import { UIStore } from "./UIStore"; | |
export const App = () => { | |
const isDarkMode = UIStore.useState(s => s.isDarkMode); | |
return ( | |
<div | |
style={{ | |
background: isDarkMode ? "black" : "white", | |
color: isDarkMode ? "white" : "black", | |
}}> | |
<h1>Hello Pullstate</h1> | |
</div> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment