Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including react-for-atom with all npm packages installed. Try it out:

var reactForAtom = require("react-for-atom")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

react-for-atom v0.14.6

Require this to get a single instance of React in Atom. Addons are lazily loaded.

react-for-atom

Wrapper around facebook/react, providing the following modifications:

A single instance of React

React does not currently play well with other instances of React on the same page (see #3252, #2402).

We propose that Atom package developers wanting to use React require this package instead of other variants of React. 'react-for-atom' exports React, ReactDOM, and all of React's addons.

const {
  cloneWithProps,
  createFragment,
  CSSTransitionGroup,
  Perf,
  PureRenderMixin,
  React,
  ReactDOM,
  shallowCompare,
  TestUtils,
  TransitionGroup,
  update,
} = require('react-for-atom');

// optional
const {PropTypes} = React;

We plan to closely track the React release cycle in order to be able to use the latest features as well as provide access to React API warnings (in atom --dev mode).

Where is LinkedStateMixin?

Data flows in one direction in React, and so 'react-for-atom' explicitly avoids two-way binding. The LinkedStateMixin is intentionally omitted.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free