Issue #3381πŸ’¬ AnsweredOpened Apr 2, 2021by pranay22101 reactions

Switching between components gives maximum call stack size error

Quick answerby Ju99ernaut❀ 1

I think arrays aren't the best method of storing page objects, so running array operations to get the page plus loading the page is probably too much for your call stack. You should consider loading the pages into memory only when you need them and store them in something like a database instead of an array. You can t...

Read full answer below ↓

Question

Hey artf, I would like to thank you for building such a powerful tool for building customized CMS. I'm implementing a new page feature in my project so I'm using your reference to switch between components but It gives me an error, Please can you guide me on how to build a new page on click add new button from the panel? Here is my code

Answers (3)

Ju99ernautβ€’ Apr 3, 2021

I think arrays aren't the best method of storing page objects, so running array operations to get the page plus loading the page is probably too much for your call stack. You should consider loading the pages into memory only when you need them and store them in something like a database instead of...

artfβ€’ Apr 20, 2021

I'm not sure what is happening on your side but I'd suggest keeping an eye on #3206 as the built-in page manager is almost ready (I'll update that issue)

GJSBlockβ€’ May 17, 2026

Thanks for reporting this, @pranay2210. Great suggestion about Switching between components gives maximum call stack size error! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using the event system: Alternative approaches: Listen to selec...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.