Skip to main content

Deferring loading of JS files until after React loads

Project description

Dash Defer JS Import

Dash Defer JS Import is a Dash component library.

Its purpose is to defer loading JS scripts until after the Dash React elements have loaded.


The package has been released to pypi and npm. Easy thing is to install using pip:

pip install dash_defer_js_import

To install from source, clone the repo and

npm install
npm run build:all
python sdist
pip install dist/dash_defer_js_import-0.0.1.tar.gz

Note: his assumes you have the requirements already installed, if not, see requirements.txt Might want to use venv to not mess up your own repo ...)


import dash_defer_js_import as dji

# Dash server initi and layout setup
# ...

app.layout = html.Article(dji.Import(src="./path/to/script.js"))


This component is based on the grasia-dash-component

It was initialized using cookiecutter thanks to the cookiecutter .

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dash-defer-js-import, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size dash_defer_js_import-0.0.2.tar.gz (36.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page