Skip to content

Commit

Permalink
Fix hook in docs to proper naming ('beforeSave')
Browse files Browse the repository at this point in the history
  • Loading branch information
afilp committed Mar 26, 2023
1 parent 0442ec7 commit 8612814
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/withLifecycleCallbacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export const dataProvider = withLifecycleCallbacks(
},
{
resource: "comments",
beforeRead: async (data, dataProvider) => { /* ... */ },
beforeSave: async (data, dataProvider) => { /* ... */ },
afterCreate: async (result, dataProvider) => { /* ... */ },
},
{
Expand Down Expand Up @@ -195,7 +195,6 @@ const fooLifecycleCallback = {
afterDelete: /* async (result, dataProvider) => result */,
afterDeleteMany: /* async (result, dataProvider) => result */,
// special callbacks
beforeRead: /* async (data, dataProvider) => data */,
afterRead: /* async (record, dataProvider) => record */,
beforeSave: /* async (data, dataProvider) => data */,
afterSave: /* async (record, dataProvider) => record */,
Expand Down

0 comments on commit 8612814

Please sign in to comment.