Phillip Malboeuf

Author profile

Phillip Malboeuf

🤯No idea is too crazy 🎯No project isn't worth it 🍻No beer offer will be refused

@phillipmalboeufMontréal, CanadaWebsiteView on DEV

Articles by @phillipmalboeuf

Browse the latest writing surfaced through DevArt.

Simple Steps to a Typescript Class Decorator
#typescript#react#context#tutorial

Simple Steps to a Typescript Class Decorator

I've been struggling with the implementation of a class decorator for my React component classes. I needed it to be able to consume a Context within the lifecycle methods of my components. If you're unsure as to how the React 16.3 Context API works, I've compiled a list of articles I've found to be most accessible on the subject. And if you're familiar with the API, please read on to explore the different pieces of a Typescript class decorator.

17 reactions0 commentsRead full article
phillipmalboeuf developer articles | DevArt