score:24

Accepted answer

you are calling reactdom.render within a react component that doesn't get rendered.

call reactdom render outside of the class definition for help

to render your button to the screen:

import react, { component } from 'react';
import reactdom from 'react-dom';
import dialog from 'material-ui/dialog';
import flatbutton from 'material-ui/flatbutton';
import raisedbutton from 'material-ui/raisedbutton';

class help extends component {
  render() {
    return (
      <div>
        <raisedbutton label="help"/> 
      </div>
    );
  }
}
reactdom.render(     
  <help />,
  document.getelementbyid('help-modal')        
);

that's it.

to avoid confusion should try and give your components meaningful names. naming both of them help can get confusing when you are trying to import one into another (which in this case isn't necessary).

if you indeed wanted to nest the help component in an app.js/index.js root level component, it would be necessary to export the element, so the class declaration line would be modified as follows:

export default class help extends component {

then in your parent component, you'd need to import it with something like:

import help from './components/help';

update: just noticed there was a type with:
import raisedbutton from 'material-ui/raisedbuton';
it's missing a 't' in raisedbutton!

should be:
import raisedbutton from 'material-ui/raisedbutton';

score:4

you need to export the help component

help.js

import react, { component } from 'react';
import dialog from 'material-ui/dialog';
import flatbutton from 'material-ui/flatbutton';
import raisedbutton from 'material-ui/raisedbuton';

class help extends component {
    render() {
           return (
                <div>
                   <raisedbutton label="help"/> 
                </div>
        );
    }
}

export default help;

and no need to create a react component to render the helpcomponent

helppage.js

import helpcomponent from '../components/help';
import reactdom from 'react-dom';

reactdom.render(     
       <helpcomponent/>,
       document.getelementbyid('help-modal')        
    );

Related Query

More Query from same tag