@dhis2/app-runtime
v3.11.2
Published
A singular runtime dependency for applications on the DHIS2 platform
Downloads
8,269
Readme
DHIS2 Application Runtime
A singular runtime dependency for applications on the DHIS2 platform
Installation
yarn add @dhis2/app-runtime
NB Please ensure that all webpack bundles reference the same Context, you can do this by adding @dhis2/app-runtime
to peerDependencies
(rather than dependencies
) and webpack externals
for library builds. Top-level web applications should be able to include the dependency directly
This library uses the official React Context API (introduced in 16.3) and React Hooks (introduced in 16.8), so React >= 16.8 is required to use it
Required Polyfills
The following must be polyfilled to support older and non-compliant browsers (i.e. IE11):
- es6.promise (i.e. core-js/features/promise)
- window.fetch (i.e. whatwg-fetch)
- AbortController / AbortSignal (i.e. abortcontroller-polyfill)
Usage
See the docs for usage and examples