I'm lost when it comes to frontend frameworks like react and some nodejs libraries. I understand the need to run some things on the server & send them to the client but can't understand how/why you'd need a nodejs library that will provide some frontend functionalities. I sometimes work with "web3" libraries (don't hate me) and it seems like I can't do anything in vanilla js. How does it work ? How do frontend frameworks work ?
Example: In the quickstart of web3-onboard [1], the first lines are used to import node modules (which can't be done in the browser) and then awaits some user action (that presumably take place in the browser) ... in the same file ?!
[1] : https://github.com/blocknative/web3-onboard#quickstart
Thanks a lot