imports/vx/client/code/ux.js
/**
     * For React debugging, compare two objects and find differences between them.
     * This can be used on either properties or state objects.
     *
     * @param {object} oldObject Old object.
     * @param {object} newObject New object.
     * @param {string} keyCheck Key to check more carefully.
     */
For React debugging, compare two objects and find differences between them.
This can be used on either properties or state objects.

@param {object} oldObject Old object.
@param {object} newObject New object.
@param {string} keyCheck Key to check more carefully.
For React debugging compare two objects and find differences between them . This can be used on either properties or state objects . @param { object } oldObject Old object . @param { object } newObject New object . @param { string } keyCheck Key to check more carefully .
showDifferences(oldObject, newObject, keyCheck) {
        if (!(oldObject && newObject)) {
            console.log(`ux.js showDifferences oldObject=${oldObject} newObject=${newObject}`)
            return
        }
        Object.keys(oldObject).forEach(key => {
            const oldProp = oldObject[key]
            const newProp = newObject[key]
            if (!isEqual(oldProp, newProp)) {
                console.log(`ux.js showDifferences key=${key}`)
                if (key === keyCheck) {
                    console.log(`ux.js showDifferences key=${key} oldProp=${JSON.stringify(oldProp)} newProp=${JSON.stringify(newProp)}`)
                }
            }
        })
    }
showDifferences ( oldObject , newObject , keyCheck ) { if ( ! ( oldObject && newObject ) ) { console . log ( ` ${ oldObject } ${ newObject } ` ) return } Object . keys ( oldObject ) . forEach ( key => { const oldProp = oldObject [ key ] const newProp = newObject [ key ] if ( ! isEqual ( oldProp , newProp ) ) { console . log ( ` ${ key } ` ) if ( key === keyCheck ) { console . log ( ` ${ key } ${ JSON . stringify ( oldProp ) } ${ JSON . stringify ( newProp ) } ` ) } } } ) }
For React debugging, compare two objects and find differences between them.
For React debugging compare two objects and find differences between them .