How to use the @wordpress/is-shallow-equal/objects function in @wordpress/is-shallow-equal

To help you get started, we’ve selected a few @wordpress/is-shallow-equal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Yoast / wordpress-seo / js / src / wp-seo-post-scraper.js View on Github external
function handleStoreChange( store, _refreshAnalysis ) {
		const previousAnalysisData = currentAnalysisData || "";
		currentAnalysisData = store.getState().analysisData.snippet;

		const isDirty = ! isShallowEqualObjects( previousAnalysisData, currentAnalysisData );
		if ( isDirty ) {
			_refreshAnalysis();
		}
	}
github Yoast / wordpress-seo / js / src / structured-data-blocks / how-to / components / HowToStep.js View on Github external
shouldComponentUpdate( nextProps ) {
		return ! isShallowEqual( nextProps, this.props );
	}
github Yoast / wordpress-seo / js / src / wp-seo-post-scraper.js View on Github external
function handleStoreChange( store, app ) {
		const previousAnalysisData = currentAnalysisData || "";
		currentAnalysisData = store.getState().analysisData.snippet;

		const isDirty = ! isShallowEqualObjects( previousAnalysisData, currentAnalysisData );
		if ( isDirty ) {
			app.refresh();
		}
	}
github Yoast / wordpress-seo / js / src / wp-seo-term-scraper.js View on Github external
function handleStoreChange( store, app ) {
		const previousAnalysisData = currentAnalysisData || "";
		currentAnalysisData = store.getState().analysisData.snippet;

		const isDirty = ! isShallowEqualObjects( previousAnalysisData, currentAnalysisData );
		if ( isDirty ) {
			app.refresh();
		}
	}
github Yoast / wordpress-seo / js / src / structured-data-blocks / faq / components / Question.js View on Github external
shouldComponentUpdate( nextProps ) {
		if ( ! isShallowEqual( nextProps, this.props ) ) {
			return true;
		}
		return false;
	}
github Yoast / wordpress-seo / js / src / wp-seo-term-scraper.js View on Github external
function handleStoreChange( store, _refreshAnalysis ) {
		const previousAnalysisData = currentAnalysisData || "";
		currentAnalysisData = store.getState().analysisData.snippet;

		const isDirty = ! isShallowEqualObjects( previousAnalysisData, currentAnalysisData );
		if ( isDirty ) {
			_refreshAnalysis();
		}
	}

@wordpress/is-shallow-equal

Test for shallow equality between two objects or arrays.

GPL-2.0-or-later
Latest version published 5 days ago

Package Health Score

98 / 100
Full package analysis