Can I use React without installing Node.js in my development setup?

I’m just getting started with React and trying to build my first simple project. I’ve seen two different approaches and I’m confused about which one to use.

First approach using Node.js:

const React = require('react');
const ReactDOM = require('react-dom');

const myComponent = React.createElement('div', { className: 'main-content' }, 'Hello React World');
ReactDOM.render(myComponent, document.getElementById('app-container'));
<!DOCTYPE html>
<html>
<head>
    <title>React App</title>
</head>
<body>
    <div id="app-container"></div>
    <script src="bundle.js"></script>
</body>
</html>

Second approach with CDN links:

const myElement = React.createElement('div', { className: 'main-content' }, 'Hello React World');
ReactDOM.render(myElement, document.getElementById('app-container'));
<!DOCTYPE html>
<html>
<head>
    <title>React App</title>
    <script crossorigin src="https://unpkg.com/react@17/umd/react.development.js"></script>
    <script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
</head>
<body>
    <div id="app-container"></div>
    <script src="main.js"></script>
</body>
</html>

The first method needs Node.js installation and package management, while the second just uses CDN. Which approach is better for learning React? Can I skip Node.js completely or will I need it eventually?

both work, but cdn gets messy fast with bigger projects. you’ll be stuck with endless createElement calls since there’s no jsx - becomes unreadable real quick. plus debugging sucks without proper dev tools. i’d do cdn for maybe a week to learn the basics, then switch to node.js setup.

hey! what kinda project do u have in mind? if it’s just simple stuff, CDN is way to go! but if u wanna dive deeper into more complex features, you might end up needing Node.js. have u actually tried both methods yet?

CDN approach is perfect for learning React basics and simple apps. I started this way too - great for understanding core concepts without dealing with build tools. But you’ll need Node.js for any real React work. Modern React development relies on JSX (needs compilation), hot reloading, component libraries, and state management - all require the Node.js ecosystem. CDN gets limiting fast when you want JSX instead of React.createElement, external packages, or multiple component files. Start with CDN to nail the basics, then switch to Node.js with Create React App once you’re comfortable with React.