Ember people, did you know that you can write components without a wrapper element (with `tagName: ''`)
-
-
Replying to @wycats
This technique is a great way to write declarative APIs for code based APIs. Ember Leaflet does this.
1 reply 0 retweets 1 like -
Replying to @knownasilya
React people call this kind of thing "higher order components"
2 replies 0 retweets 1 like -
Replying to @wycats
Ilya Radchenko Retweeted Kent C. Dodds
Just watched this video and it seems this technic is actually called render propshttps://twitter.com/kentcdodds/status/911086452699627522 …
Ilya Radchenko added,
1 reply 0 retweets 1 like -
-
Replying to @kentcdodds @wycats
Well I guess your right in regards to tagName: '' but I'm talking more about the use of that to build declarative apis with {{yield}}
1 reply 0 retweets 1 like -
Replying to @knownasilya @kentcdodds
I've completely lost this thread at this point...
2 replies 0 retweets 1 like -
Watched! "Render prop" is synonymous with "Block Param" in Ember: <Mouse>{mouse => ...}</Mouse> {{
#my-mouse as |mouse|}}...{{/my-mouse}}1 reply 0 retweets 3 likes -
And with the upcoming angle bracket syntax in Ember: <Mouse as |mouse|>...</Mouse>
1 reply 0 retweets 2 likes
fwiw I really do think that having a built-in syntax for this helps cut through a lot of the debate about whether this is a good idea.
-
-
And nothing is stopping JSX from having syntax like <Mouse as |foo|> or something that people think looks more like JS like <Mouse (foo)>
2 replies 0 retweets 0 likes -
If this matters to anyone in the React community: The Ember community is 100% behind block params aka render props. It's how we roll.
0 replies 1 retweet 1 like
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.