Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Foods = ({ title }) => {
const [clicks, setClicks] = useState(0)
const { dispatch, foods = [] } = useStoreon('foods')
return (
<div>
<h1>{ title }</h1>
<div>
{foods.list.map(food => <p>{food}</p>)}
</div>
<p>{clicks}</p>
<p>
<button> setClicks(clicks + 1)}>Add</button>
</p>
</div>
)
}