How to use the react-dom.render function in react-dom

To help you get started, weโ€™ve selected a few react-dom examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github maxmantz / redux-oidc-example / src / index.js View on Github external
import ReactDOM from "react-dom";
import App from "./components/app";

// you'll need this for older browsers
require("es6-promise").polyfill();

const styles = {
  root: {
    fontFamily: '"Roboto", sans-serif',
    background: "#fff",
    display: "flex",
    alignItems: "center"
  }
};

ReactDOM.render(
  <div style="{styles.root}">
    
  </div>,
  document.getElementById("app")
);
github EdgeApp / edge-login-ui / packages / edge-login-ui-web / src / demo / index.js View on Github external
// @flow

import 'regenerator-runtime/runtime'

import React from 'react'
import { render } from 'react-dom'

import { Page } from './components/Page.js'

// Render the main component to the document body:
const root = document.getElementById('app')
if (root == null) throw new Error('Incorrect page HTML')
render(, root)
github contiamo / operational-visualizations / src / website / TestCases / Grid / table-2.tsx View on Github external
columns: ["Customer.AgeGroup", "Customer.Gender"],
    });

    const axes = {
      row: ({ row, width, height }: { row: number; width: number; height: number }) =&gt; {
        const h = height - 2 * padding;
        const yScale = useScaleBand({ frame: pivotedFrame.row(row), column: "Customer.City", size: height });
        return (
          <svg style="{{" viewBox="{`0" height="{h}" width="{width}">
            
          </svg>
        );
      },
    };

    ReactDOM.render(
      
        {size =&gt; (
           {
                if ("row" in param) {
                  return uniqueValues(pivotedFrame.row(param.row), "Customer.City").length * barWidth + padding * 2;
                }
                return "columnIndex" in param || ("measure" in param &amp;&amp; param.measure === true) ? 35 : chartHeight;
              },
github yuvipanda / simplest-notebook / packages / codeeditor / src / jsoneditor.tsx View on Github external
constructor(options: JSONEditor.IOptions) {
    super();

    this.addClass(JSONEDITOR_CLASS);
    ReactDOM.render(Private.createEditorContent(options), this.node);

    let host = this.editorHostNode;
    let model = new CodeEditor.Model();

    model.value.text = 'No data!';
    model.mimeType = 'application/json';
    model.value.changed.connect(
      this._onValueChanged,
      this
    );
    this.model = model;
    this.editor = options.editorFactory({ host, model });
    this.editor.setOption('readOnly', true);
    this.collapsible = !!options.collapsible;
  }
github prpatel / react-workshop-day1 / Lab3 / solution.js View on Github external
return (
      <div>
        
          
            <h1>Welcome to Fort Lauderdale!</h1>
            <p>The current time is: {formattedDate}</p>
            <p><button>Learn more</button></p>
          
        

      </div>
    );
  }
}

ReactDOM.render(
  ,
  document.getElementById('root')
);
github minedeljkovic / redux-elmish / examples / pair-of-counters / src / main.js View on Github external
const renderApp = (View) =&gt; {
  const ConnectedView = connect(appState =&gt; ({ model: appState }))(View);

  render((
    
      
        
      
    
  ), document.getElementById('app'));
}
renderApp(CounterPairView);
github makeflow / boring-router / packages / boring-router-react / examples / basic / main.tsx View on Github external
Home
        
        
          <p>About page</p>
          Home
        
        
          <p>Not found</p>
          Home
        
      
    );
  }
}

ReactDOM.render(, document.getElementById('app'));
github fanduel-oss / refract / examples / visit-time / rxjs / src / index.js View on Github external
runningTime: timestamp - prevState.lastResumeTimestamp
    }),
    pause: timestamp =&gt; prevState =&gt; ({
        lastResumeTimestamp: null,
        totalTime:
            prevState.totalTime + timestamp - prevState.lastResumeTimestamp,
        runningTime: timestamp - prevState.lastResumeTimestamp
    })
}

const AppWithEffects = compose(
    withState(initialState, mapSetStateToProps),
    withEffects(aperture, { handler, errorHandler })
)(App)

render(, document.getElementById('root'))
github doyoe / Yo / component_dev / list / demo / demo.js View on Github external
this.red(item);
                            }}
                            item={item}
                        /&gt;}
                        itemTouchClass="item-touch"
                        infinite={true}
                        onItemTap={(item, index, target) =&gt; this.mutateDataSource(item, index, target)}
                        itemExtraClass={(item, index) =&gt; index}
                    /&gt;
                
            
        );
    }
}

ReactDOM.render(, document.getElementById('content'));