0.7.0 • Published 2 years ago

react-idle-components v0.7.0

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

What is React Idle Components?

RIC is a component first solution to building idle games in React and React Native. It comes out of the box with currency and ticker management, all you have to provide is the visuals!

Getting Started

Installing

npm: npm i react-idle-components yarn: yarn add react-idle-components

Basic Usage

import React from 'react';
import {CurrencyContextProvider, Ticker, TickerOutput} from 'react-idle-components';

const VisualPercentage: React.FC<TickerOutput> = ({ percentage }) => {
  return (
    <>{percentage}</>
  );
};

const ExampleComponent = () => {
  return (
    <CurrencyContextProvider currencies={{main: 0}}>
      <Ticker duration={3} valuePerTick={5} level={0} currency='main'>
        <VisualPercentage />
      </Ticker>
      <Ticker duration={5} valuePerTick={1} level={0} currency='main'>
        <VisualPercentage />
      </Ticker>
    </CurrencyContextProvider>
  );
}
0.7.0

2 years ago

0.6.2

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.3

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago