Skip to content

Commit 828e09c

Browse files
committed
Add section about Luau inability to infer param props and how to fix
1 parent 0d5b010 commit 828e09c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,14 @@ rojo serve testing.project.json
185185
```
186186

187187
For more help, check out [the Rojo documentation](https://rojo.space/docs).
188+
189+
## Issues
190+
191+
If you run into issues where, you're creating an element like:
192+
`TextButton({ onActivated = function(rbx) end })`, and Luau is unable to infer
193+
`rbx` as `TextButton`, you may want to set the following parameters to `True`:
194+
https://github.com/fewkz/froact/blob/0b749d9a2cfb90eb03780e29f2bcbb7e587f8628/generate.py#L26-L29
195+
This will fix Luau not being able to infer the parameter correctly, but may
196+
drastically increase the size of `froactful.lua`, the added convenience is
197+
definitely worth it however. The distributed version of froact has these set to
198+
`False` by default.

0 commit comments

Comments
 (0)