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 React Basics (2018) Understanding State Create a Component as a Class

Alena Miadzvedskaya
Alena Miadzvedskaya
6,386 Points

Hello, Looks like it's time to update. React 16.8 let use state and other React features without writing a class

Looks like this info is outdated. Since React 16.8 it's no need to write a class to use a state and other React features. Thank you, hope it helps

Cesar Quintero
Cesar Quintero
7,949 Points

Thank you for this! Glad I caught it early. Even though this material is great, they should be updating it constantly as needed for the sake of the students who put their money into this platform.

David Kayser
David Kayser
12,009 Points

Is there any reason to use a class then? Or should it always be a function from now on?

2 Answers

Steven Parker
Steven Parker
231,275 Points

While the forum is a great place to get help from other students on learning issues, a better way to submit comments and suggestions on course material is by contacting the staff as described on the Support page.

Vadim Ant
Vadim Ant
1,102 Points

So I'm learning outdated React... awesome (not)