README
react-randoml
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
Returned Values
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