-
-
Save johncorderox/64c0fe6de0a73e7506dae934a354708c to your computer and use it in GitHub Desktop.
React Delete + Axios
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// After an API call to delete, refresh the state with Filter. | |
var NewThings = this.state.things.filter((x) => { return x.id != id;}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This can be ran with the Axios library after
axios.delete
is called to remove the item(s).