Skip to content

deep-equal crashes on newer React? #441

@wmertens

Description

@wmertens

I've experienced some call-too-deep errors, and I think somehow React is introducing circular references and then deep-equal follows them.

I worked around this like so:

import {isEqual} from 'lodash'

// Helmet uses deep-equal and sometimes crashes on circular objects
Helmet.prototype.shouldComponentUpdate = function(nextProps) {
	return !isEqual(this.props, nextProps)
}

It seems to work - lodash has circular reference protection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions