Reputation: 91
In react-admin, All I know is that the framework provides two ways for me to update, they are setting dataProvider refresh to true and refreshbutton. Now my situation is that I have a dialog which used to pay. And the pay request is not restful api. So I have to use 'fetch'. And after pay, How can I refresh the current View to get lastest data?
Upvotes: 4
Views: 1004
Reputation: 3319
You can import and dispatch Redux action "refreshView" from 'ra-core', example: https://github.com/marmelab/react-admin/blob/master/packages/ra-ui-materialui/src/button/RefreshButton.js
Upvotes: 1
Reputation: 75
please provide more details. Also, view is auto refreshed when state/prop is updated!
In rare cases, forceupdate() can be used
Upvotes: 1