New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-life-game

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-life-game

A React component that renders "Conway's Game of Life" 👾 .

  • 1.2.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

👾 React life game

A React component that renders "Conway's Game of Life" 👾 .

You are a great God 👼 in this life game world, so you can control the life and death of cells by clicking on them.

lifegame

🌏 Installation

npm:

$ npm install react-life-game

yarn:

$ yarn add react-life-game

🚀 Usage

import { LifeGameField } from 'react-life-game';

function App() {
  return (
    <LifeGameField
      option={
        {
          /* option here */
        }
      }
    />
  );
}

👽 Playground

CodeSandBox

🛠️ option

optiontypedescriptiondefault
initialAliveRationumberRatio of living cells in the initial state ([0,1])0.12
intervalnumberTime per each generation ([ms])1000
aliveColorstringColor of living cells ( can be any color that "css" can accept. i.e. blue, #1e3a8a, ... )#1e3a8a
deadColorstringColor of dead cells ( can be any color that "css" can accept. i.e. blue, #1e3a8a, ... )#0f172b
cellSizenumberSize of cell ([px])12
widthnumberWidth of the field of game of lifewindow.innerWidth
heightnumerHeight of the field of game of lifewindow.innerHeight

FAQs

Package last updated on 31 Jan 2022

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