How to use the workflow-react.requireComponent function in workflow-react

To help you get started, we’ve selected a few workflow-react 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 havardh / workflow / packages / workflow-experiment / flows / experiment.js View on Github external
/* eslint-env node */
import React from 'react';
import render, { Workspace, Layouts, requireComponent } from 'workflow-react';

const { SplitH, SplitV } = Layouts;

const Emacs = requireComponent('workflow-app-emacs');
const Terminal = requireComponent('workflow-app-terminal');
const Ssh = requireComponent('workflow-app-ssh');

export default render(
github havardh / workflow / packages / workflow-server / flows / WorkflowServerDemo.js View on Github external
/* eslint-env node */
import { join } from 'path';

import React from 'react';
import render, { Workspace, requireComponent } from 'workflow-react';

const { SplitH } = requireComponent('workflow-layout-tiled');
const Atom = requireComponent('workflow-app-atom');
const Chrome = requireComponent('workflow-app-chrome');

async function seconds(secs) {
  return new Promise(resolve => setTimeout(resolve, secs * 1000));
}

class AtomWrapper extends React.Component {
  constructor(props) {
    super(props);
    this.state = { file: 'package.json' };
  }

  async componentDidMount() {
    await seconds(4);
    this.setState({ file: 'WorkflowServerDemo.js' });
    await seconds(2);
github havardh / workflow / packages / workflow-experiment / flows / experiment.js View on Github external
/* eslint-env node */
import React from 'react';
import render, { Workspace, Layouts, requireComponent } from 'workflow-react';

const { SplitH, SplitV } = Layouts;

const Emacs = requireComponent('workflow-app-emacs');
const Terminal = requireComponent('workflow-app-terminal');
const Ssh = requireComponent('workflow-app-ssh');

export default render(
github havardh / workflow / packages / workflow-server / flows / WorkflowServerDemo.js View on Github external
/* eslint-env node */
import { join } from 'path';

import React from 'react';
import render, { Workspace, requireComponent } from 'workflow-react';

const { SplitH } = requireComponent('workflow-layout-tiled');
const Atom = requireComponent('workflow-app-atom');
const Chrome = requireComponent('workflow-app-chrome');

async function seconds(secs) {
  return new Promise(resolve => setTimeout(resolve, secs * 1000));
}

class AtomWrapper extends React.Component {
  constructor(props) {
    super(props);
    this.state = { file: 'package.json' };
  }

  async componentDidMount() {
    await seconds(4);
    this.setState({ file: 'WorkflowServerDemo.js' });
    await seconds(2);
    this.setState({ file: '../package.json' });
github havardh / workflow / packages / workflow-experiment / flows / experiment.js View on Github external
/* eslint-env node */
import React from 'react';
import render, { Workspace, Layouts, requireComponent } from 'workflow-react';

const { SplitH, SplitV } = Layouts;

const Emacs = requireComponent('workflow-app-emacs');
const Terminal = requireComponent('workflow-app-terminal');
const Ssh = requireComponent('workflow-app-ssh');

export default render(
github havardh / workflow / packages / workflow-app-spotify / flows / Example.js View on Github external
/* eslint-env node */
import React from 'react';
import render, { Workspace, requireComponent } from 'workflow-react';

const Spotify = requireComponent('workflow-app-spotify');
const { Playlist } = Spotify;

export default render(
  
    
      
    
  
);

workflow-react

This module contains a [react](https://github.com/facebook/react) binding library for writing workflow configuration files. The example below shows how to configure a 50-50 split between a text editor and a browser.

MIT
Latest version published 6 years ago

Package Health Score

42 / 100
Full package analysis