Whats the main purpose about experience-extension-extras ? #9
Replies: 1 comment
-
The purpose of the experience-extension-extras was to reduce the boilerplate code needed to fetch and update data in cards and pages. A pattern evolved as we built many POC projects with the Ranger team. We baked this into the Data Query features that you are seeing. We based this on react-query, because it perfectly matched our original code pattern. We added to this the three data fetch functions to our Data Query to cover the primary Ethos related data fetch cases. Note you can use your own fetch function as needed. I apologize that the README is not extensive. It does give a straightforward example of how to use it, but it doesn't cover all the many possible combinations of its use. The examples in the experience-ethos-examples cover a fair range of uses. I do need to find some time to document this better. DataQueryProvider is used to establish a React Context so that any children components have access to the data through hooks. Hope that helps. If you find any issues, you are welcome to create a fork and PR or an issue to address them. It might take reading and playing with a few examples to get comfortable with this. Bret with Ellucian |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, we have seen some examples in the experience-ethos-examples. We noticed your are calling some hooks from ellucian/experience-extension-extras and we have the next questions
What's the main purpose to use useDataQuery ?
What's the main purpose for DataQueryProvider and UserTokenDataConnectQuery ?
How does the useDataQuery “isLoading” differ from “setLoadingStatus”?
What is the purpose of the useDashboard hook?
Any help will be really appreciate it.
Beta Was this translation helpful? Give feedback.
All reactions