fewkz / froact

Wrapper around Roact & Roact Hooks to simplify UI development and add full, correct Luau typing
MIT License
3 stars 0 forks source link

Pass children to templates onUpdate function in second arg #6

Open fewkz opened 2 years ago

fewkz commented 2 years ago

We should probably do the same thing for templates, by passing a second arg to the onUpdate callback functions with the children

Originally posted by @fewkz in https://github.com/fewkz/froact/issues/4#issuecomment-1264689185

fewkz commented 1 year ago

i'm so confused how would this would even work for templates... they are instance-based, would the "children" be instances or elements? idk why I made this issue. The way I could see this working is it passes the elements to the onUpdate function, and the template would be responsible for doing froact.Roact.mount, froact.Roact.update, and froact.Roact.unmount.