Legacy React addon for performing shallow comparison of props and state to optimize component rendering performance
Overall
score
99%
A utility function that performs shallow comparison to determine whether two sets of properties have changed.
@generates
/**
* Performs shallow comparison between two objects representing current and next properties.
* Returns true if the objects are different (changes detected).
* Returns false if the objects are the same (no changes detected).
*
* @param {Object} current - The current properties object
* @param {Object} next - The next properties object
* @returns {boolean} true if objects differ, false if they are the same
*/
function hasChanged(current, next) {
// IMPLEMENTATION HERE
}
module.exports = { hasChanged };Provides shallow comparison functionality for detecting property changes.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-react-addons-shallow-comparedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10