react-randoml

RandoML implementation for React

Usage no npm install needed!

<script type="module">
  import reactRandoml from 'https://cdn.skypack.dev/react-randoml';
</script>

README

react-randoml

NPM version NPM downloads

About

RandoML implementation for React

How to Install

First, install the library in your project by npm:

$ npm install react-randoml

Or Yarn:

$ yarn add react-randoml

Getting Started

Options

RandoML options

Returned Values

RandoML methods

Example

useRandoml hook:

import React from 'react';
import { useRandoml } from 'react-randoml';

const App = () => {
  const { choose } = useRandoml(/* object with options (if needed) */);

  const randomValue = choose();

  return (
    <h1>{randomValue}</h1>
  );
}

export default App;

withRandoml HOC:

import React from 'react';
import { withRandoml } from 'react-randoml';

const App = ({ choose }) => {
  const randomValue = choose();

  return(
    <h1>{randomValue}</h1>
  );
}

export default withRandoml(App, /* object with options (if needed) */);

License

This project is licensed under the MIT License © 2020-present Jakub Biesiada