I want to redirect the user to the previous screen after they create a record but also refresh the previous listing screen to reflect the new record
This is the function in my actions file
fetch(CREATE_POST, request).then(response => {
dispatch({ type: action });
Actions.pop();
setTimeout(() => { Actions.refresh({}) }, 10);
}).catch(error => {
console.log(error);
});
However, when Actions.pop() is called, it takes me to the previous screen but does not refresh it.
I tried with Actions.pop({ type: reset }) but no luck
Any help would be really appreciated!