IssueRaiser

React-helmet crashes with the hook useEffect

Hi. I was just trying out hooks for the first time and I noticed that when I use Helmet on a component that has the hook useEffect, it crashes with maximum call stack size exceeded error: ``` Uncaught RangeError: Maximum call stack size exceeded at isUndefinedOrNull (index.js:27) at objEquiv (index.js:44) at push../node_modules/deep-equal/index.js.module.exports (index.js:23) at objEquiv (index.js:96) at push../node_modules/deep-equal/index.js.module.exports (index.js:23) at objEquiv (index.js:96) at push../node_modules/deep-equal/index.js.module.exports (index.js:23) ... ``` I fixed the issue by using props on the Helmet component, instead of using children. Before: ``` <Helmet> <title>test</title> </Helmet> ``` After: ``` <Helmet title="test" /> ``` Any ideas why this is happening? Seems to be related to #373 Thanks.

Posted by raRaRa on Feb 7, 2019, 10:54 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,000 issues0 comments

github (Other)

React-helmet crashes with the hook useEffect

raRaRaFeb 7, 2019, 10:54 AM

Hi. I was just trying out hooks for the first time and I noticed that when I use Helmet on a component that has the hook useEffect, it crashes with maximum call stack size exceeded error: ``` Uncaught RangeError: Maximum call stack size exceeded at isUndefinedOrNull (index.js:27) at objEquiv (index.js:44) at push../node_modules/deep-equal/index.js.module.exports (index.js:23) at objEquiv (index.js:96) at push../node_modules/deep-equal/index.js.module.exports (index.js:23) at objEquiv (index.js:96) at push../node_modules/deep-equal/index.js.module.exports (index.js:23) ... ``` I fixed the issue by using props on the Helmet component, instead of using children. Before: ``` <Helmet> <title>test</title> </Helmet> ``` After: ``` <Helmet title="test" /> ``` Any ideas why this is happening? Seems to be related to #373 Thanks.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue