You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I keep getting error messages on the switch component that says "Error in Switch.tsx Component exceeded time limit.". It is extremely frustration and slowing me down, because the error occurs every 5-10 minutes.
Any ideas or suggestions, or fixes would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
Framer has a "budget" for loading and rendering all code components in a project. The budget is shared across all components in your project (both your own and those from packages), so if any of them loads or renders a little bit slowly and blows through the budget, all other components will show the "exceeded time limit" message.
It’s important to note that Switch is a container component, and when placed on the canvas, all it does is re-render the Frame you’ve pointed it to. If there’s anything in that Frame that renders slowly, then the whole Switch component will exceed its time limit, even though it technically didn’t contribute to the “slowness”.
I know this can be incredibly frustrating, but unfortunately there's not much that can be done other than ensuring that components load and render as fast as possible. I'd recommend:
Clean up unused packages
Take a look at your own components and check if they're calling functions at the root level of the component, instead of just exporting components. If they're calling functions, see if you can make them work without the function calls
See if you’re doing any particularly expensive work when rendering your components
Additionally, there's work I'm planning to do on the Switch side to make it load faster. Since there's a huge number of props on the component, I'm using a few helper functions to generate them at load time. I'll likely move those to be generated at build time, instead, so I can avoid any function calls at the root level of the component. Stay tuned for that update.
I keep getting error messages on the switch component that says "Error in Switch.tsx Component exceeded time limit.". It is extremely frustration and slowing me down, because the error occurs every 5-10 minutes.
Any ideas or suggestions, or fixes would be greatly appreciated.
The text was updated successfully, but these errors were encountered: