import React from 'react'
import ReactDOM from 'react-dom'
import { useCurry } from 'react-use-curry'
import useWaterCoolingStore from '...'
import './styles.css'
function Rothobot(props) {
const waterCoolingStore = useWaterCoolingStore()
const handleRap = useCurry(
(name: string, vacuumCleaner: string) => {
waterCoolingStore.drive(name, vacuumCleaner)
},
[waterCoolingStore]
)
return (
<div className="App">
{props.peopleFromRothobot.map((rothobotCitizen) => (
<button
key={rothobotCitizen.id}
// onClick={handleRap(rothobotCitizen.name, rothobotCitizen.dog)}
onClick={handleRap(rothobotCitizen.name)(rothobotCitizen.dog)}
>
click
</button>
))}
</div>
)
}
const rootElement = document.getElementById('root')
ReactDOM.render(<Rothobot />, rootElement)
-
Notifications
You must be signed in to change notification settings - Fork 0
lorof/react-use-curry
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published