refactor: code quality

This commit is contained in:
Richard 2024-04-20 18:48:09 -07:00
parent f0a7938703
commit 8ca299f671
16 changed files with 82 additions and 101 deletions

View file

@ -1,10 +1,9 @@
local capture = require(script.Parent.capture)
local store = require(script.Parent.store)
local types = require(script.Parent.types)
type Molecule<T> = types.Molecule<T>
local function subscribe<T>(molecule: Molecule<T>, callback: (state: T, prev: T) -> ()): () -> ()
local atoms, state = capture(molecule)
local atoms, state = store.capture(molecule)
local function listener()
local prevState = state