@gen/react-use-p5
TypeScript icon, indicating that this package has built-in type declarations

0.4.3 • Public • Published

react-use-p5

use p5 with hooks

Node.js CI NPM JavaScript Style Guide

Install

# with npm
npm install --save @gen/react-use-p5

# with yarn
yarn add @gen/react-use-p5

Usage

import React, { Component } from 'react';
import { useP5 } from '@gen/react-use-p5';
import { sketch } from 'your-p5-sketch-file';

const Component = () => {
  const [setRef] = useP5(sketch);
  // Canvas will be rendered as child of div
  return <div ref={setRef} />
}

License

MIT © zenoplex

Readme

Keywords

none

Package Sidebar

Install

npm i @gen/react-use-p5

Weekly Downloads

592

Version

0.4.3

License

MIT

Unpacked Size

6.87 kB

Total Files

8

Last publish

Collaborators

  • gen