onUploadRemove = () => {
console.log("delete");
console.log("delete state:", this.state.backgroundImge);
this.setState({
backgroundImge: null // Remove the background image
}, () => {
console.log("Updated state:", this.state.backgroundImge);
this.forceUpdate();
});
};
on call this function state of background image is change to null but image is showing why
onUploadRemove = () => {
console.log("delete");
console.log("delete state:", this.state.backgroundImge);
this.setState({
backgroundImge: null // Remove the background image
}, () => {
console.log("Updated state:", this.state.backgroundImge);
this.forceUpdate();
});
};
create that function and want to remove background image from screen