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
{{ message }}
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
A little context: When Dash serves the page, it crawls the app.layout to see which component libraries are being used (e.g. dash_core_components). Then, with this list of unique component libraries, it serves the necessary JS and CSS bundles that are distributed with those component libraries.
In this case, we’re serving dash_table_experiments on a separate page, as the response of a callback. Dash only sees dash_html_components and dash_core_components in the app.layout and so it doesn’t serve the necessary JS and CSS bundles that are required for the dash-table-components component that is rendered in the future.
This is a design flaw of Dash. For now, you can get around this issue by rendering a hidden dash-table-experiments component in the layout like:
I'm running into this or a very similar issue with a custom react component that must be dynamically created. It is not trivial to statically add this react component to the app.layout so that it will included in the crawl. Is there a simple way that we can force dash to include this react component?
@edvard-bjarnason meanwhile Dash add support to load components dynamically, you could try to use our Import facility within our own made Dash components suite. So with this Import component you can directly add an external javascript once the page and Dash is completely loaded, you could use javascript code that sets your component to show up on a certain time, be hooked to an event or be displayed in a certain place.
You can see examples of the usage of this here in Python or here in React / JavaScript.
I'm curious, though, if we could make gdc.Import work for loading the dependencies a React component that is going to be added dynamically to the Dash app...It doesn't look like, so if you really need that and only that, most likely you will need to have a null component for your suite or a null state of your component, so you can add that to the app.layout in static time and then replace or just load your complete component in run time.
Let me know how far your research goes and if you get it working.
Activity
chriddyp commentedon Mar 5, 2018
Something like this might work: https://github.com/zeit/next.js/#3-with-no-ssr
Akronix commentedon Mar 6, 2018
See our workaround: Grasia/grasia-dash-components#2
edvard-bjarnason commentedon Sep 5, 2018
I'm running into this or a very similar issue with a custom react component that must be dynamically created. It is not trivial to statically add this react component to the app.layout so that it will included in the crawl. Is there a simple way that we can force dash to include this react component?
T4rk1n commentedon Sep 5, 2018
@edvard-bjarnason You can override the dash index and include your component bundle in there.
Akronix commentedon Sep 7, 2018
@edvard-bjarnason meanwhile Dash add support to load components dynamically, you could try to use our Import facility within our own made Dash components suite. So with this Import component you can directly add an external javascript once the page and Dash is completely loaded, you could use javascript code that sets your component to show up on a certain time, be hooked to an event or be displayed in a certain place.
You can see examples of the usage of this here in Python or here in React / JavaScript.
I'm curious, though, if we could make gdc.Import work for loading the dependencies a React component that is going to be added dynamically to the Dash app...It doesn't look like, so if you really need that and only that, most likely you will need to have a null component for your suite or a null state of your component, so you can add that to the app.layout in static time and then replace or just load your complete component in run time.
Let me know how far your research goes and if you get it working.
chriddyp commentedon Nov 7, 2018
This has been fixed in plotly/dash#444. Invisible component hacks are no longer needed! 🥇 to @T4rk1n who took this on 🎉