A react components library with the extreme user experience
yarn add x-ui
import React, { FC, useState } from 'react'
import { XNumber } from 'x-ui'
import { useInterval } from 'react-use'
import { random } from 'lodash'
const Random: FC = () => {
const [value, setValue] = useState(random(-10000, 10000, true).toFixed(2))
useInterval(() => {
setValue(random(-10000, 10000, true).toFixed(2))
}, 2000)
return <XNumber value={value} />
}
MIT © XFreeCoder