score:5
Accepted answer
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello React!</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.2/react.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.2/react-dom.min.js"></script>
<script src="https://unpkg.com/babel-core@5.8.38/browser.min.js"></script>
</head>
<body>
<div id="example"></div>
<script type="text/babel">
ReactDOM.render(
<h1>Hello, world!</h1>,
document.getElementById('example')
);
</script>
</body>
</html>
Source: stackoverflow.com
Related Query
- why ReactDOM is not defined in my helloworld program?
- Uncaught ReferenceError: ReactDOM is not defined
- Why do I have to .bind(this) for methods defined in React component class, but not in regular ES6 class
- React, Uncaught ReferenceError: ReactDOM is not defined
- Why am I getting ReferenceError: self is not defined when I import a client-side library?
- Why is Component not defined
- Why it says the `hover:` class does not exist. If `hover:` is a custom class, make sure it is defined within a `@layer` directive?
- why do I get this error: 'postcss' is not recognized as an internal or external command, operable program or batch file, when I use tailwindcss
- ReactDom is not defined with react and webpack
- ReactDOM is not defined ( but from within a React method )
- Why do I get ReferenceError: RTCPeerConnection is not defined in Next.js?
- 'Redux' is not defined ... as well as ReactRedux and ReactDOM
- Why an action is not defined in action-creator function in react-redux?
- Why is there a ReferenceError: window is not defined in Nextjs
- Why does typescript complain when I import a component, but not when the component is defined in the same file?
- Why am I getting: Uncaught ReferenceError: Button is not defined (ReactJS and Elemental UI)?
- Why do ReactDOMServer and ReactDOM give the "root.hydrate is not a function" error
- Uncaught ReferenceError: ReactDOM is not defined with bundle.js
- Why I am getting the fetch is not defined error?
- Why is .map returning values on console but not in elements defined on React?
- Why is this exception being thrown? Uncaught ReferenceError: React is not defined
- ReactDom createPortal() doesn't work but render() does, and only once not if trigger is repeated - why is this?
- Why do I keep getting a TypeError: setScrollNav is not a function, when function is defined
- Why does my App is giving Error: DailyData is not defined
- ReactDOM is not defined by using react/17.0.1/umd/react.development.js
- I'm using React to retrieve data from Firebase, but the userItem is not defined in my render function why
- Dirt simple reactjs program - why is the data not displaying?
- ReactDOM.unmountComponentAtNode: Uncaught ReferenceError: ReactDOM is not defined
- Why do I keep getting "JSX is not defined no-undef"
- paypal is not defined in paypal.Buttons.driver("react", { React, ReactDOM });
More Query from same tag
- Pass a function to a child component
- Type '{ children: Element; }' has no properties in common with type 'IntrinsicAttributes' React -typescript Context
- Could not proxy request /user/register from localhost:3000 to http://localhost:3002/
- Show alert based on each condition
- How to create a dynamic route in react with react router
- How can I apply this style to my slideshow?
- React-Slick error when embedding on server side
- Module parse failed: Unexpected token (1:68)
- Change width of dropdown according to screen resolution
- .map() function does not render out message in react.js
- How to avoid extra renders in my component to use react hooks
- Cannot find module '@material-ui/core'
- Mocking URLSeachParams
- How to access a key value within State in a function?
- Page renders faster than fetching the data and displaying it
- Automatic vendor chunk with dynamic code splitting
- Error: Minified React error #130: Element type is invalid: expected a string or a class/function but got: undefined
- How to show loader in button only to current mapped value?
- How to create a package.json script that runs a file from node_modules?
- JSON request with React returning undefined
- How to use scss with css modules / postcss inside components
- React pass data attribute to DOM
- Mutate after Fetch using React-Query
- Adding key value pair to specific objects in an array
- Mysterious ESLint Parsing Error
- this.setState is giving error
- How to push data to array ReactJs
- Adding MUI Component to Component Library results in Error "Hooks can only be called inside of the body of a functional component"
- How I can separate and dynamic set html template for react component?
- React Material-UI TextField looses focus with every key