Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-runner

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-runner

Run your React code on the air

  • 0.1.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16K
decreased by-9.74%
Maintainers
1
Weekly downloads
 
Created
Source

react-runner

Run your React code on the air https://nihgwu.github.io/react-runner/

Install

# Yarn
yarn add react-runner

# NPM
npm install --save react-runner

Props

  • children function({ element, error }), required render props
  • code string, required the code to be ran
  • scope object globals that could be used in code
  • type string the type system of the code, code be typescript or flow

Usage

import Runnder from 'react-runner'

// pseudo code
render(
  <Runner code={code} scope={scope} type={type}>
    {({ element, error }) => (error ? error.toString() : element)}
  </Runner>
)

or hooks (require React 16.8 or above)

import { useRunner } from 'react-runner'

const { element, error } = useRunner({ code, scope, type })

License

MIT © Neo

Keywords

FAQs

Package last updated on 08 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc