Add user database migration, core reusable components, and layout structure
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
export function createStore(initial) {
|
||||
let state = { ...initial };
|
||||
const subscribers = new Set();
|
||||
|
||||
return {
|
||||
get() { return { ...state }; },
|
||||
set(updates) { state = { ...state, ...updates }; subscribers.forEach(fn => fn(state)); },
|
||||
subscribe(fn) { subscribers.add(fn); return () => subscribers.delete(fn); },
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user