![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
react-life-game
Advanced tools
A React component that renders "Conway's Game of Life".
$ npm install react-life-game
$ yarn add react-life-game
import { LifeGameField } from 'react-life-game';
function App() {
return (
<LifeGameField
option={
{
/* option here */
}
}
/>
);
}
option | type | description | default |
---|---|---|---|
initialAliveRatio | number | Ratio of living cells in the initial state ([0,1]) | 0.12 |
interval | number | Time per each generation ([ms]) | 1000 |
aliveColor | string | Color of living cells ( can be any color that "css" can accept. i.e. blue , #1e3a8a , ... ) | #1e3a8a |
deadColor | string | Color of dead cells ( can be any color that "css" can accept. i.e. blue , #1e3a8a , ... ) | #0f172b |
cellSize | number | Size of cell ([px]) | 12 |
width | number | Width of the field of game of life | window.innerWidth |
height | numer | Height of the field of game of life | window.innerHeight |
By default, this component is not resizable.
To support window resize, you need to use key
prop for this component generated by useKeyOnResize
hook.
import { LifeGameField, useKeyOnResize } from 'react-life-game';
function App() {
const { key } = useKeyOnResize();
return <LifeGameField key={key} option={{...}} />;
}
FAQs
A React component that renders "Conway's Game of Life" 👾 .
The npm package react-life-game receives a total of 0 weekly downloads. As such, react-life-game popularity was classified as not popular.
We found that react-life-game demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.