News for hackers. Stuff that matters.
Re:Visual Studio Code 1.5 by Brakenshire on Thursday September 08, 2016 @06:16PM (#12457889)
The standard recommendation seems to be to use PropTypes. And also in general, to use Babel with React programs. Would be interested to hear experiences of using Typescript with React.
Re:Visual Studio Code 1.5 by mythz on Thursday September 08, 2016 @06:48PM (#12458112)
Using React, Redux, JSPM, TypeScript work great together in VS.NET, it compiles on save so you don't need to run any additional watchers and JSPM's bundle feature means you also don't need Babel. Since ES6 support is VS.NET is very weak, using TypeScript is the best way to use the latest ES6/TypeScript features today:

https://github.com/ServiceStackApps/typescript-redux

Re:Visual Studio Code 1.5 by ryanluker on Thursday September 08, 2016 @06:57PM (#12458181)
I converted wes bos' react tutorial series to typescript with much success and learned a lot along the way. https://www.github.com/ryanluker/typed-catch-of-the-day
Re:Visual Studio Code 1.5 by tga on Thursday September 08, 2016 @07:42PM (#12458465)
In my opinion React support is progressing quickly but is not fully there yet (definitely more documentation is needed), so for the JSX part the pain is greater than the gain (especially given PropType checking already in React).

As an example, to see what I mean, try to figure out how to write a properly typed Higher Order Component function. Last time I looked at it, this had no direct mention in documentation and only workarounds on StackOverflow.

Re:Visual Studio Code 1.5 by tomduncalf on Friday September 09, 2016 @05:11AM (#12460575)
You can "pass through" props like so:

export var hocFunction: (arg1: any, arg2: any) => <ComponentT>(component: ComponentT) => ComponentT

If you want to add new props as a result of the HOC then see the react-redux .d.ts for a few examples: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/mast...

Re:Visual Studio Code 1.5 by amk_ on Thursday September 08, 2016 @09:31PM (#12459057)
It seems a little strange but you can import the propTypes of the wrapped component (argument to the HOC) into the wrapper and incorporate them into your type checking there.