我不理解,投入的彩色类型是如何运作的。
我试图带一个色体,把这个数值变成一个国家变量“col”。
const [color, setColor] = useState(false);
const colorPicker = () => {
console.log("colorPicker", color.target);
return(
<input type="color" value={color} onChange={setColor}/>
);
}
但是,这只给我留下了青.和我试图看像肤色那样的 j子。 目标是:
Warning: This synthetic event is reused for performance reasons. If you re seeing this, you re accessing the property
target
on a released/nullified synthetic event. This is set to null. If you must keep the original synthetic event around, use event.persist(). See https:// fb dot me/react-event-pooling for more information.