-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
The ImageUploader component uploads to IPFS and sets the value of the state variable provided.
However, this does not work with the new useState.
Working code:
State.init({
img: null,
});
return (
<div className='container row'>
<div>
Image upload: <br />
<IpfsImageUpload image={state.img} />
</div>
</div>);Breaks when replaced with useState variable:
const [img, setImg] = useState(null);
return (
<div className="container row">
<div>
Image upload: <br />
<IpfsImageUpload image={img} />
</div>
</div>
);It gives error:
See this widget for example.
Could this be fixed with a "onChange" instead of image={} ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
