Following tutorial to set up remix app

This commit is contained in:
2024-04-26 20:22:03 +02:00
parent a68339f3db
commit 6877c045c3
25 changed files with 12874 additions and 2 deletions
+10
View File
@@ -0,0 +1,10 @@
export const singleton = <Value>(
name: string,
valueFactory: () => Value
): Value => {
const g = global as any;
g.__singletons ??= {};
g.__singletons[name] ??= valueFactory();
return g.__singletons[name];
};