3 ms·
Point taken on TypeScript, I'll clean up that example later today. Perhaps I should move TS to a separate section. I totally expected rerender to be a bit cont
by jeswin 6y ago
Point taken on TypeScript, I'll clean up that example later today. Perhaps I should move TS to a separate section.
I totally expected rerender to be a bit controversial. But if you look at React, the user does provide (strong) hints in the form of the setState() invocation - which could be done here as well.
But then again, it's a tradeoff. Simplicity, and Python's Explicit is better than implicit.
- dfee 6y agoI disagree. At worst you can let a user switch between a TS / JS code block, but really we don’t want to hunt around your .d.ts files to discover what the docs should tell us.
- lux 6y agoOr make it a toggle instead of a separate section. I really appreciate being able to toggle between languages in API docs.
- eyelidlessness 6y agoI’d highly recommend keeping TS first class. There are components/tools available to group TS/JS examples in tabs and let the user consume whichever they prefer. (Forgive me for not linking I’m on phone and gotta run.)