question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RangeError: Maximum call stack size exceeded using antd Drawer

See original GitHub issue

Not sure what the error is, i’m trying to use Antd on a project with Preact but can’t seem to use Drawer (other components don’t work either, like Menu…)

this is what i get from the console on the browser:

Uncaught (in promise) RangeError: Maximum call stack size exceeded
    at Object.createElement (preact-compat.es.js?9cf4:294)
    at Drawer.getChildToRender (Drawer.js?a09f:561)
    at Drawer.render (Drawer.js?a09f:147)
    at callMethod (preact-compat.es.js?9cf4:505)
    at Drawer.eval [as render] (preact-compat.es.js?9cf4:515)
    at renderComponent (preact.js?10a9:271)
    at Drawer.forceUpdate (preact.js?10a9:398)
    at Drawer.componentDidUpdate (Drawer.js?a09f:104)
    at renderComponent (preact.js?10a9:316)
    at Drawer.forceUpdate (preact.js?10a9:398)
Promise.then (async)
enqueueRender @ preact.js?10a9:35
setState @ preact.js?10a9:394
Topbar._this.showDrawer @ index.js?2616:18
Button._this.handleClick @ button.js?f9fc:130
eventProxy @ preact.js?10a9:95

I’m using the example on the Antd website to see if it runs, but no luck… https://ant.design/components/drawer/

My npm install spits out a few react-context warnings, maybe it’s because of that!! Any help on solving this?

Thanks, Tiago

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
marvinhagemeistercommented, Nov 27, 2019

@Jossnaz No need to post snarky comments in an issue that’s been closed and had no activity for half a year. That’s not helpful for anyone.

As @JoviDeCroock already laid out: It’s unfortunate that certain libraries rely on internal React features that even the React team doesn’t think is stable and thus shouldn’t be used except for experimental stuff.

There is nothing stopping antd from using stable APIs instead 👍

1reaction
JoviDeCroockcommented, Jun 12, 2019

Going to throw it in the channel if we want to support cases like these in compat but from my point of view, we shouldn’t. Things that are marked unstable are that for a reason.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'maximum call stack size exceed' when using Antd Menu ...
Whenever i use Antd Menu inside HOC wrapped component then suddenly i am getting this issue and Api request is called continuously. Even...
Read more >
Maximum call stack size exceeded when layout change
Navigating to/from routes with different layouts doesn't trigger any issues. It means you have a bug in your app code. The issue is...
Read more >
Drawer - Ant Design
A Drawer is a panel that is typically overlaid on top of a page and slides in from the side. It contains a...
Read more >
Docs for antd nuxtjs when using babel-plugin-import-Vue.js
Coding example for the question Docs for antd nuxtjs when using ... Using import in Vue components gives "RangeError: Maximum call stack size...
Read more >
Error RangeError: Maximum call stack size exceeded
We have validated the reported “This error is almost always means you have a problem with recursion in JavaScript code” problem at our...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found