`setName` makes sure that state changes are queued up for the
next render, allowing you to treat all state and props as constant within the current render. If you are just assigning variables directly, then your state is changing
within the same render cycle, which can lead to all sorts of nasty bugs that are difficult to replicate.
I get that assigning variables is easier to understand, but it's way, way harder to actually scale and maintain. Check out flux architecture.