Questions tagged [react-dom]

React package for working with the DOM.

npm install react react-dom

This package serves as the entry point of the DOM-related rendering paths. It is intended to be paired with the isomorphic React, which will be shipped as react to npm.

Usage

In the browser

var React = require('react');
var ReactDOM = require('react-dom');
 
class MyComponent extends React.Component {
  render() {
    return <div>Hello World</div>;
  }
}
 
ReactDOM.render(<MyComponent />, node);

On the server

var React = require('react');
var ReactDOMServer = require('react-dom/server');
 
class MyComponent extends React.Component {
  render() {
    return <div>Hello World</div>;
  }
}
 
ReactDOMServer.renderToString(<MyComponent />);
1131 questions
-3
votes
2 answers

TypeError: Cannot read property 'map' of undefined react

PLEASE HELP ME ! [1]: https://i.stack.imgur.com/IOQrC.png * ERROR MESSAGE [2]: https://i.stack.imgur.com/S5iir.png * SOURCE CODE
-3
votes
1 answer

how to display whats up in a responsive way by using react js

enter image description herei develop what's up web by using react. my scenario is when ever i execute in desktop it will be displayed in a desktop responsive and whenever i displayed in a mobile it will be displayed in a mobile responsive how to do…
-4
votes
1 answer

Invalid hook call error in minimal example

I'm trying to write an SPA with a React frontend, and the very minimal code I've written is complaining about an invalid hook call. I understand that there are, per the error message, three major reasons for this error: You might have mismatching…
Phil Darnowsky
  • 412
  • 4
  • 11
-4
votes
1 answer

Why can't we use quotation marks instead of curly brackets with onClick if it's inside a render() function?

I have a class App that extends React.Component, in App there is the following render() code render() {return(
)} replacing the quotations…
E.S
  • 101
  • 1
  • 1
  • 9
-4
votes
1 answer

How to add a standard react app without using node.js

In enterprise projects, Authentication and Authorization is different because we use SSO (Single Sign On) or use an internal CDN (Content Delivery Network) to read some data in Client web Application. In some projects like this the program lines are…
A.J
  • 139
  • 1
  • 1
  • 10
1 2 3
75
76