@uppy/react
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -0,3 +1,7 @@ | ||
import getHTMLProps from "./getHTMLProps.js"; | ||
export default function nonHtmlPropsHaveChanged(props, prevProps) { | ||
return Object.keys(props).some(key => !Object.hasOwn(props, key) && props[key] !== prevProps[key]); | ||
// todo instead rewrite the components that use nonHtmlPropsHaveChanged | ||
// to hooks, so we can use useEffect on specific props instead of this hack | ||
const htmlProps = getHTMLProps(props); | ||
return Object.keys(props).some(key => !Object.hasOwn(htmlProps, key) && props[key] !== prevProps[key]); | ||
} |
{ | ||
"name": "@uppy/react", | ||
"description": "React component wrappers around Uppy's official UI plugins.", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"license": "MIT", | ||
@@ -36,5 +36,5 @@ "main": "lib/index.js", | ||
"peerDependencies": { | ||
"@uppy/core": "^4.0.0", | ||
"@uppy/dashboard": "^4.0.0", | ||
"@uppy/drag-drop": "^4.0.0", | ||
"@uppy/core": "^4.0.1", | ||
"@uppy/dashboard": "^4.0.1", | ||
"@uppy/drag-drop": "^4.0.1", | ||
"@uppy/file-input": "^4.0.0", | ||
@@ -41,0 +41,0 @@ "@uppy/progress-bar": "^4.0.0", |
@@ -0,7 +1,12 @@ | ||
import getHTMLProps from './getHTMLProps.ts' | ||
export default function nonHtmlPropsHaveChanged< | ||
T extends Record<string, unknown>, | ||
>(props: T, prevProps: T): boolean { | ||
// todo instead rewrite the components that use nonHtmlPropsHaveChanged | ||
// to hooks, so we can use useEffect on specific props instead of this hack | ||
const htmlProps = getHTMLProps(props) | ||
return Object.keys(props).some( | ||
(key) => !Object.hasOwn(props, key) && props[key] !== prevProps[key], | ||
(key) => !Object.hasOwn(htmlProps, key) && props[key] !== prevProps[key], | ||
) | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
107666
1557