4 ms·
It looks strange to me, too. It looks like they using typescript in their examples, probably to be more descriptive.
by timwis 9y ago
It looks strange to me, too. It looks like they using typescript in their examples, probably to be more descriptive.
- danabramov 9y agoIt is Flow. We were trying to be descriptive for folks who already use it (like we do at FB) so they know the intended type signatures, but the same changes apply if you skip the types. Sorry it came across as confusing.
- danabramov 9y agoI edited the post to hide the annotations behind a gist: https://github.com/reactjs/reactjs.org/pull/719 https://github.com/reactjs/reactjs.org/pull/719 Hope this is clearer now!
- Waterluvian 9y agoThanks, Dan. I can appreciate the value that Flow adds. But in my opinion, when it's default in the code examples of a top shelf library, it creates an implicit dependency to learning from the blog post, no matter how small or obvious it may be.