Setting up react project with classes
I just followed the tik-tac-toe game tutorial from the React docs (https://reactjs.org/tutorial/tutorial.html) and noticed that we were using classes, but when I use the
npx create-react-app my-app
it makes a projects with functions. Is there a way to make a new react project based off of classes or do I have to change those manually?Tutorial: Intro to React – React
A JavaScript library for building user interfaces
7 Replies
Use their new beta docs
And try Vite soon as you can CRA is blah
👍 ill try those out thank you!
not sure if i missed it, but i didnt see anything that answers my question in there
Are you learning React or you actually want to use classes? React hooks are the new recommended way
It's just JS
im learning react, the tutorial i followed used the classes to develop their components (not sure of the correct name) instead of functions
Right and I'm telling you should probably learn the current way
It's functions with hooks
React Docs Beta
A JavaScript library for building user interfaces
This is one the reasons I didn't learn React.... So convoluted...