mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
This commit is contained in:
parent
96e577a626
commit
bf1b1978d9
8 changed files with 279 additions and 226 deletions
64
todo.md
64
todo.md
|
|
@ -1,6 +1,60 @@
|
|||
# Todo
|
||||
```lua
|
||||
function TextInput(p: {
|
||||
DefaultText: string,
|
||||
Output: (string) -> ()
|
||||
} & Layout)
|
||||
return create "TextBox" {
|
||||
Layout = p.Layout,
|
||||
Children = p.Children
|
||||
|
||||
BackgroundText = DefaultText,
|
||||
|
||||
[{"Changed"}] = function(self)
|
||||
p.Output(self.Text)
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
function Counter()
|
||||
local count = source(0)
|
||||
|
||||
return create "TextButton" {
|
||||
Text = count
|
||||
}
|
||||
end
|
||||
|
||||
source
|
||||
derive
|
||||
map
|
||||
|
||||
spring
|
||||
```
|
||||
|
||||
onCleanup
|
||||
Index
|
||||
For
|
||||
untrack
|
||||
batch
|
||||
|
||||
## version 1
|
||||
|
||||
```lua
|
||||
map(items, function(item, i)
|
||||
return Item {
|
||||
Item = item, -- primitive
|
||||
LayoutOrder = i
|
||||
}
|
||||
end)
|
||||
```
|
||||
|
||||
## version 2
|
||||
|
||||
```lua
|
||||
each(items, function(item, i)
|
||||
return Item {
|
||||
Item = item, -- state
|
||||
LayoutOrder = i
|
||||
}
|
||||
end)
|
||||
```
|
||||
|
||||
- investigate solid js `for` and batching
|
||||
- equality checking of derived state updates to prevent redundant updates of derived state
|
||||
- watcher callbacks when watcher watches a parent and child
|
||||
- stores
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue