From 9e4b72800fc4f9c91e56a77bfd20989665645477 Mon Sep 17 00:00:00 2001 From: karmaniverous Date: Tue, 20 Dec 2022 21:30:43 +0800 Subject: [PATCH] docs update --- README.md | 2 +- doc/3-api.md | 2 +- src/export/blockRefresh/blockRefresh.mjs | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9130d24..af84cf8 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Use as the equalityFn argument to Redux useSelector() when the selected value is ``` **Example** ```js -// Deploy as an anonymousfunction to set options. const obj = useSelector((state) => state.slice.obj, (a, b) => blockRefresh(a, b, options)); +// Deploy as an anonymous function to set options. const obj = useSelector( (state) => state.slice.obj, (a, b) => blockRefresh(a, b, options) ); ``` diff --git a/doc/3-api.md b/doc/3-api.md index 109e871..b8c7458 100644 --- a/doc/3-api.md +++ b/doc/3-api.md @@ -45,7 +45,7 @@ Use as the equalityFn argument to Redux useSelector() when the selected value is ``` **Example** ```js -// Deploy as an anonymousfunction to set options. const obj = useSelector((state) => state.slice.obj, (a, b) => blockRefresh(a, b, options)); +// Deploy as an anonymous function to set options. const obj = useSelector( (state) => state.slice.obj, (a, b) => blockRefresh(a, b, options) ); ``` diff --git a/src/export/blockRefresh/blockRefresh.mjs b/src/export/blockRefresh/blockRefresh.mjs index 402ccbb..9ecf3e5 100644 --- a/src/export/blockRefresh/blockRefresh.mjs +++ b/src/export/blockRefresh/blockRefresh.mjs @@ -39,8 +39,11 @@ import _ from 'lodash'; * const obj = useSelector((state) => state.slice.obj, blockRefresh); * * @example - * // Deploy as an anonymousfunction to set options. - * const obj = useSelector((state) => state.slice.obj, (a, b) => blockRefresh(a, b, options)); + * // Deploy as an anonymous function to set options. + * const obj = useSelector( + * (state) => state.slice.obj, + * (a, b) => blockRefresh(a, b, options) + * ); */ export const blockRefresh = (a, b, options = {}) => { const { log, path, predicate, refreshUndefined } = options;