Skip to content

Instantly share code, notes, and snippets.

View strinkaus-gd's full-sized avatar
🤩

Sascha Trinkaus strinkaus-gd

🤩
View GitHub Profile
@koenbok
koenbok / store.ts
Last active November 10, 2023 00:17
import * as React from "react";
/**
A hook to simply use state between components
Warning: this only works with function components (like any hook)
Usage:
// You can put this in an central file and import it too
const useStore = createStore({ count: 0 })