mirror of
https://github.com/muerwre/muerwre.github.io.git
synced 2025-04-25 02:46:39 +07:00
add new notes, fix gh-pages
This commit is contained in:
parent
2af996c99c
commit
c4c6aa2294
3 changed files with 87 additions and 4 deletions
|
@ -5,7 +5,6 @@ import { useEffect, useRef } from 'react';
|
|||
* tell you, which one changed after rerender.
|
||||
* Use `prefix` to distinguish props of different components.
|
||||
*/
|
||||
// eslint-disable-next-line import/no-unused-modules
|
||||
export const useWhatsChanged = (
|
||||
props: Record<string, unknown>,
|
||||
prefix = '',
|
||||
|
@ -18,7 +17,6 @@ export const useWhatsChanged = (
|
|||
!Object.prototype.hasOwnProperty.call(prevProps.current, key) ||
|
||||
prevProps.current[key] !== value
|
||||
) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(`${prefix} ${key} has changed`);
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue