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
0
votes
2 answers

React component does not update

I am using React and Redux for my application. I have a dynamic form when i drag my question of same type my component position does not update. For dragging i am using JqueryUI Sortable My question object: var questions : [ {"name" : "Question…
Aatif Bandey
  • 1,193
  • 11
  • 14
0
votes
0 answers

Issue with react-dom when deploying on heroku Error: Cannot resolve 'file' or 'directory' ./lib/ReactDOM

I have a create-react-app on heroku. When I try to deploy a change to production it is failing and giving me the following error: Module not found: Error: Cannot resolve 'file' or 'directory' ./lib/ReactDOM in…
gtmoses
  • 1
  • 1
0
votes
2 answers

jQuery and React.js aren't playing nice

The error: _registerComponent(...): Target container is not a DOM element. The line the is causing the is $('#container')in main.jsx. When I substitute that for document.getElementById('container') all is well. What am I doing wrong? Is jQuery not…
Doug Beney
  • 310
  • 2
  • 13
0
votes
1 answer

(React + Meteor) Edit content in another div?

I currently have this as my "index" for my Meteor app: import React from 'react'; export const App = React.createClass({ propTypes: { children: React.PropTypes.element.isRequired, }, render() { return
pizzae
  • 2,815
  • 6
  • 26
  • 45
0
votes
0 answers

Webpack export breaks js

I'm making a react application using node, express. But suddenly i get this error "Uncaught SytaxError: Unexpected Token :" And breaks at this line : /***/ function(module, exports) { module.exports =…
Uberfume
  • 13
  • 4
0
votes
2 answers

Uncaught TypeError: Cannot read property 'PropTypes' of undefined(…) React Bootstrap problems, also ReactDOM is not defined issues with proper import

So I'm building a react-JS website with express serving the back-end. I'm using react-router and react-stormpath for authentication. Using webpack as well. I'm having issues with bootstrap javascript loading. I installed react-bootstrap and am…
Eric Han
  • 45
  • 2
  • 10
0
votes
1 answer

access Component state value in renderDOM

This is my app.jsx and i want to access isAdmin state of Login Component into app.js...isAdmin identifies whether user is admin or not and based upon the value..i want to manipulate the routes....How i can achieve this ?? Please help i am new to…
0
votes
1 answer

React not rendering under loop

name and Product under th tag gets rendered but the loop for doesn't get rendered..but i can see the values in console.nad doesn't throw any error...please hemp name productID …
shank
  • 91
  • 3
  • 13
0
votes
1 answer

ReactJs unable to find Ref

My target: to find ref of label and colorize it. Code used: colorizeLabel(){ ReactDOM.findDOMNode(this.refs.amountLabel).color('#ffffff'); } which produce: Uncaught TypeError: Cannot read…
IntoTheDeep
  • 4,027
  • 15
  • 39
  • 84
0
votes
2 answers

React not rendering prop?

So for some reason react is not rendering my txt property in my simple app. This is my code in App.js file : import React from 'react'; import ReactDOM from 'react-dom'; class App extends React.Component { render() { return

0
votes
1 answer

React Dynamic form state handling

I have a dynamic form. The form grows in no preferred pattern based on user input and I capture all the user inputs from the form as React State. On form submit I convert the State(JSON) into a YAML file.The JSON structure of this state has a deep…
bks4line
  • 485
  • 3
  • 10
  • 23
0
votes
0 answers

React Server Side Rendering - Invalid Checksum Warning

I'm doing the react tutorial by Nodeschool, the module titled learnyoureact. I'm on the Isomorphic lesson (8 of 11) and I'm running into the warning: warning.js:44Warning: React attempted to reuse markup in a container but the checksum was…
Sticky
  • 3,671
  • 5
  • 34
  • 58
0
votes
1 answer

React: get value from a select field in a DOM node

I'm a novice back end developer and I've been tasked with fixing a feature and I'm stuck on the react portion. I can't seem to find the appropriate syntax to get a value from a select component and that's pretty much my whole issue. I've looked at…
brianfr82
  • 271
  • 1
  • 5
  • 19
0
votes
1 answer

How to access the boolean value of child's property "checked" in ReactJS?

I want to access the boolean value of child's property "checked" in ReactJS. Now I have the following render method. Class LoginCard.js render() { return (
Casper
  • 4,435
  • 10
  • 41
  • 72
0
votes
3 answers

Package react does not satisfy its siblings

Was trying to install sudo npm install react-datagrid --save sudo npm install react-datepicker --save Console Output npm ERR! peerinvalid The package react does not satisfy its siblings' peerDependencies requirements! npm ERR! peerinvalid Peer…
Shashank K
  • 388
  • 4
  • 13