const [measure, setMeasure] = useState("us");
{recipe.map((d) => {
return (
<ul>
<li>
{d.measures.${measure}.amount}{d.name}
</li>
</ul>
);
})}
I’m new to React and currently trying to do a map function that makes use of a state variable that is being declared (and can be changed with useState). My codes are as above but it does not work. Any advice and help would be greatly appreciated!