Use Data Source Story Questions #412
Answered
by
jassmith
engrpatel21
asked this question in
Q&A
-
Hi I have some questions on the use data source example in the story book. I read through the code and understand what you are doing. Is the difference here that you are using faker js to generate the data for you, and you are setting the data the with: if (cache.current[key] === undefined) {
cache.current[key] = faker.name.firstName() + " " + faker.name.lastName();
}
const d = cache.current[key]; Is this supposed to mimic getting data from a database? Can async/await be used here to fetch data? |
Beta Was this translation helpful? Give feedback.
Answered by
jassmith
Jun 23, 2022
Replies: 1 comment
-
Check out the use-async-data-source instead if you need a remote data fetcher. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
engrpatel21
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check out the use-async-data-source instead if you need a remote data fetcher.