News for hackers. Stuff that matters.
Re:Using TypeScript with React by Epskampie on Thursday August 22, 2019 @09:56AM (#20768079)
I still don't hear a good argument as to why you should't use classes for your model.

I use [serializr](https://github.com/mobxjs/serializr) to convert json to my classes, and afterwards I can have all the deligtful methods I want. :-) I love the code clarity this gives, methods are where they are most logical, instead of on some helper object.

Re:Using TypeScript with React by 0XAFFE on Thursday August 22, 2019 @10:08AM (#20768210)
There is also class-transformer[1] and class-validator[2] which also do the same job but integrate a bit better into the whole typescript cosmos.

[1] https://github.com/typestack/class-transformer [2] https://github.com/typestack/class-validator

Re:Using TypeScript with React by Roboprog on Thursday August 22, 2019 @05:39PM (#20772629)
Method implies use of this, which implies they are probably not first class - such would be functions cannot be passed or returned, as the this reference won’t be bound if called as a function.