React is a framework that doesn't want to admit it's a framework. If you follow its recommendations like Hooks, you have to write your JS a "special way" since React owns your component lifecycle.
Put simply, React calls your component, your component does not call React. Your UI code needs to work inside of React, not around it.
The relevant and most upvoted HN article on the difference between libraries and framework is: