ambitious-knife-25690
07/22/2021, 11:10 PMambitious-knife-25690
07/22/2021, 11:10 PMambitious-knife-25690
07/22/2021, 11:12 PMambitious-knife-25690
07/23/2021, 1:12 AMuser
07/23/2021, 5:59 AMuser
07/23/2021, 6:00 AMexpr
user
07/23/2021, 6:13 AMambitious-knife-25690
07/23/2021, 1:15 PMambitious-knife-25690
07/23/2021, 1:15 PMin
in a typesafe way because it's a keyword in haxeambitious-knife-25690
07/23/2021, 1:16 PMuser
07/23/2021, 1:17 PMin
prop
- allow you to do <MyExternComponent in={foo} />
in your jsx
- get it to send "in" prop in js, without runtime overheadambitious-knife-25690
07/23/2021, 1:18 PMuser
07/23/2021, 1:19 PMin
prop in your props typedef (because it doesn't work properly), but instead hook a macro that will check props that were not recognized and allow (+ pass) any prop named "in" (with typechecking iirc)user
07/23/2021, 1:20 PMambitious-knife-25690
07/23/2021, 1:47 PMambitious-knife-25690
07/23/2021, 1:48 PMambitious-knife-25690
07/23/2021, 1:48 PMambitious-knife-25690
07/23/2021, 1:49 PMambitious-knife-25690
07/23/2021, 1:53 PMif (some_condition)
what is this condition meant to be? 🤣ambitious-knife-25690
07/23/2021, 1:54 PMexpr
and the name
match up?user
07/23/2021, 2:02 PMif (name == "in")
?user
07/23/2021, 2:04 PMexpr
will be what is passed as value to the name
prop
So you check if name
is recognized, and generate ($expr :ExpectedTypeForThisProp)
and compiler does the type checking
Then this will be set to name
propambitious-knife-25690
07/23/2021, 4:00 PMambitious-knife-25690
07/23/2021, 4:01 PMambitious-knife-25690
07/23/2021, 4:01 PMambitious-knife-25690
07/23/2021, 4:02 PMambitious-knife-25690
07/23/2021, 4:02 PMambitious-knife-25690
07/23/2021, 4:02 PMuser
07/23/2021, 4:05 PMuser
12/22/2021, 5:38 PM