import React, { Component } from "react"; import { DiceRoller } from "../../services/dice-roller"; import { IQuickRollState } from "./interfaces/i-quick-roll-state"; class QuickRoll extends Component { constructor(props) { super(props); this.state = { roll: 0 }; } roll(str) { const roll = DiceRoller.roll(str); this.setState({ roll }); } render() { return (

Roll: {this.state.roll}

); } } export { QuickRoll };