// store.ts
export const [appState, setAppState] = createStore({globalValue: "I'm alive!"});
// App.tsx
import {appState} from './store.ts'
export default function App(){
return (
<h1>{appState.globalValue}</h1>
)
}
// store.ts
export const [appState, setAppState] = createStore({globalValue: "I'm alive!"});
// App.tsx
import {appState} from './store.ts'
export default function App(){
return (
<h1>{appState.globalValue}</h1>
)
}