As far as I know, this concept of stateful and stateless is from Flutter, the tutorial you mentioned is using class components that of course you can follow, but nowadays, using only function components is more recommended.
a function component can have zero, one or more state that you declare it and you can initialize it this way:
const [myState, setMyState] = useState(1); // initialization to 1
Then, each time you use setMyState()
to give your state a new value the component rerenders, because this is how we update the value of a state, with its setter function
that's it, as simple as that.
If your component does not have any state (regardless if it is a function or a class), then you can think of it as a stateless component that does not rerender by itself, unless it is using some hooks.