romellogoodman / react-rune

React wrapper for Rune.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-rune

npm version

React wrapper for Rune.js

Install

npm i react-rune

Use

import React from 'react';
import Rune from 'react-rune';

const FooBar = () => {
  const draw = (rune) => {
    rune.rect(0, 0, 200, 200).fill(0, 0, 255);
  };

  return (
    <>
      <div id="canvas" />
       <Rune height={400} width={400} draw={draw} />
      </div>
    <>
  );
};

export default FooBar

About

React wrapper for Rune.js

License:MIT License