Follow this quick guide to add a
Table component to your application using the DHIS2 UI Library.
First, let's import the Table component as well as its child components:
In this example, we are using the DHIS2 App Runtime to fetch and display the
programs resource from the DHIS2 Web API (as you can see in the
query object defined in the
src/App.js file below).
See the highlighted lines of code - this is how we can represent the programs data in a
In your browser, you should be able to see the following
Please check the UI Library documentation for more examples and a list of demos as well as code snippets that let you easily copy and paste into your application! 👌🏽