# Is there documentation or tutorial on how to transition from using d2 library to app platform

**URL:** <https://community.dhis2.org/t/is-there-documentation-or-tutorial-on-how-to-transition-from-using-d2-library-to-app-platform/56858>\
**Category:** App Development\
**Created:** [1 February 2024 07:35 UTC](https://community.dhis2.org/t/is-there-documentation-or-tutorial-on-how-to-transition-from-using-d2-library-to-app-platform/56858 "2024-02-01T07:35:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jetisco4u](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/jetisco4u/32/39125_2.png) [@jetisco4u](https://community.dhis2.org/u/jetisco4u)\
**Post date:** [1 February 2024 07:35 UTC](https://community.dhis2.org/t/is-there-documentation-or-tutorial-on-how-to-transition-from-using-d2-library-to-app-platform/56858/1 "2024-02-01T07:35:26Z")

</div>

I am trying to upgrade some app that uses the [d2](https://github.com/dhis2/d2) and [app-runtime-adapter-d2](https://github.com/dhis2/app-runtime-adapter-d2) libraries to using the App Platform as recommended. Is there a documentation or article on how to transition?

Particularly, how do I handle cases of Post, Update and Delete requests that uses the d2 API. Also the getInstance from d2?

---

<div class="post-metadata">

**Author:** ![kpvandivier](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/kpvandivier/32/36689_2.png) [@kpvandivier](https://community.dhis2.org/u/kpvandivier)\
**Post date:** [2 February 2024 16:39 UTC](https://community.dhis2.org/t/is-there-documentation-or-tutorial-on-how-to-transition-from-using-d2-library-to-app-platform/56858/2 "2024-02-02T16:39:03Z")

</div>

Hey @jetisco4u! I don’t think we have any specific documentation about migrating away from from using `d2` for data fetching and mutations unfortunately, but the data tools from the `@dhis2/app-runtime` library may be what you’re looking for 🙂

It uses a declarative, React hook-based API, so it will be a bit different than using the `d2` API. The `useDataQuery()` hook ([link to docs](https://dhis2.nu/docs/app-runtime/hooks/useDataQuery)) can perform the `GET` requests, and the `useDataMutation()` ([link to docs](https://dhis2.nu/docs/app-runtime/hooks/useDataMutation)) hook can achieve `POST`, `PUT`, and `DELETE` actions by using `type: 'create' | 'update' | 'delete'` when defining the mutation. `getInstance()` from `d2` won’t be necessary when using the App Runtime 👍

If you want a very thorough tutorial on how to use the `app-runtime` library, we have some videos from a web development academy that can be useful:

- Intro: [https://youtu.be/pvIppH5plMU](https://youtu.be/pvIppH5plMU)
  - (Note that the documentation for the App Runtime now lives on [developers.dhis2.org](http://developers.dhis2.org/))

- Data queries and mutations: [https://youtu.be/dnagTunwHls](https://youtu.be/dnagTunwHls)
- Advanced app runtime: [https://youtu.be/rPvkAWurDoY](https://youtu.be/rPvkAWurDoY)

Good luck and happy coding! 🙂
