0.4.3 • Published 2 years ago

@gen/react-use-p5 v0.4.3

Weekly downloads
8
License
MIT
Repository
github
Last release
2 years ago

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

0.4.3

2 years ago

0.4.2

2 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago