Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 621 Bytes

File metadata and controls

5 lines (3 loc) · 621 Bytes

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 component. If you're unsure as to how the React 16.3 Context API works, I've compiled a list of the articles I've found to be the 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.

Read the full article on dev.to!