Getting Started
The DHIS2 application runtime provides a common, consistent, single-dependency runtime dependency for DHIS2 applications. It is published as @dhis2/app-runtime
on NPM
Installation
> yarn add @dhis2/app-runtime
Please ensure that all webpack bundles reference the same instance of
@dhis2/app-runtime
. We recommmend runningnpx yarn-deduplicate --packages @dhis2/app-runtime
. Libraries should include@dhis2/app-runtime
as apeerDependency
.
Requirements
React >= 16.8
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. Visit reactjs.org to learn about React development.
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)