DEV Community

Discussion on: Creating a typed "compose" function in TypeScript

Collapse
 
mackentoch profile image
John Doe

Thank you for this article.

But I feel like the more I practice and read about Typescript the more it seems better for OOP programming rather than functional programing (React uses so much more functional concepts than Angular for instance).

It is such a pain (maybe just because I'm too ignorant with TS?) in a React application (HOC, composition...) that I feel more productive and things stay far more simple with FlowJS (only where I need not all codebase).

Collapse
 
ascorbic profile image
Matt Kane

I don't agree here. The reason I wrote about these is precisely because they're edge cases. There's no reason that FP should be any harder than OOP in TypeScript. If you're happy with Flow, in 99% of cases the TypeScript syntax is basically identical. The main difference you'll see is just better tooling and more typings available.

Collapse
 
mackentoch profile image
John Doe

Agreeing is not important, but sharing thoughts is what make us evolve.

Thank you for taking time replying 🙏