The goal of this package is to help developers to easily create react forms from smart-contracts ABI.
https://cryptol0g1c.github.io/react-eth/
The live demo uses Bootstrap. But feel free to give your own styling.
import ReactEth from 'react-eth';
const abi = {
"constant": false,
"inputs": [
{
"name": "spender",
"type": "address"
},
{
"name": "value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
};
<ReactEth abi={abi}>
- abi: json.
- className: string.
- onChange: function.
- onSubmit: function.
- Clone this repo
- Run
npm install
- Run
npm run examples
- Navigate to http://localhost:8080