I'm using React and I want to put the result of this function in the localstorage so it can persist in the page after reload.
createNewField(key){
this.setState({
[key] : this.state[key].concat({...this.state.templates.empty[key], id: uniqid()}),
})
}
Is it possible to create a new field and make it back to the page after reload with the same function or do i need another function for that?