Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Joseph Michelini
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Joseph Michelini
Python Development Techdegree Graduate 18,692 Points

Are there any Treehouse React courses that cover the use of Hooks?

I'm taking the React courses that Treehouse offers right now and really enjoying them, but it seems like most new(er) React code is making use of hooks and doing away with class components. Is this covered in any of the Treehouse courses?

Thanks in advance!

2 Answers

Rick Gleitz
Rick Gleitz
47,839 Points

I don't know if this counts (probably not) but it is the only thing I can find with the term 'hooks' in it. I don't know much about them except that they allow you to use React in functions outside of classes. This link and text for that step are from the React Components course

https://teamtreehouse.com/library/update-the-stopwatch-state-with-componentdidmount

"In this video, we'll use the componentDidMount() lifecycle method to make the stopwatch tick. React's built-in lifecycle methods get called at each point in a component's life-cycle. The methods act as hooks you can use to run code at key times in the life-cycle. This gives you the ability to control what happens when a component mounts, updates and unmounts."

This might have been a precursor to hooks, but you would know better than me. Hope this helps in some little way.

Joseph Michelini
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Joseph Michelini
Python Development Techdegree Graduate 18,692 Points

Hey Rick,

Unfortunately I've already taken this course and though it was helpful, didn't cover the subject material I was looking for.

Thanks for your help!

Rick Gleitz
Rick Gleitz
47,839 Points

You're welcome. Hopefully Treehouse will come out with a course on hooks in the near future.