3 ms·
React has zero dependencies to use it, actually. https://github.com/facebook/react/blob/master/package.json https://github.com/facebook/react/blob/master/packa
by debaserab2 9y ago
React has zero dependencies to use it, actually.
https://github.com/facebook/react/blob/master/package.json https://github.com/facebook/react/blob/master/package.json
- RobertRoberts 9y agoCan you use react without Node or NPM or a compiler/transpiler or build tool?
- debaserab2 9y agoOf course - just pop it in a script tag and use the React object functions to render your DOM (which is exactly what transpiled code does)
- RobertRoberts 9y agoI've looked into Vue.js, and they seem to indicate that it's easier to get up an running than react (using what you describe here). Are you suggesting vue.js and react work exactly the same?
- debaserab2 9y agoI don't know because I don't use Vue. What you'd be missing if you dropped in the react library and did no compilation at all is the ability to use JSX. I'm guessing vue's argument is their attribute tags still work in their minimal deployment whereas with React you'd be manually wiring up things to the React object functions. So, with React, instead of: return <div>My component!</div> You use: return React.createElement('div', {}, 'My component!); Some people like the more implicit style anyways (although I don't and I don't know anybody who does at this point)