Closed TheCarlR closed 4 years ago
Hey @TheCarlR! Thanks for adding an example. Curious what the motivation behind adding this was?
We use redux-query in a project I just started in, and there was issues with it. Especially making the interfaces work with strict compilation, so having your hacker news sample in TypeScript as a source of truth was very valuable for me. @rctbusk
So, just in general, my comment is that we don't actually store example code in this codebase. We use codesandbox and add the links to the website and readme. This reduces the size of the repo and allows us to make changes to examples without having to push PRs.
So my question to you would be are you willing to write up this example in codesandbox, and then I will fork it and add the link to our documentation? I do think this is a super valuable example to have, especially since typescript is huge and most likely is what people will be using.
Yes, sure. I'll fix it.
@rctbusk Sample up here now: https://codesandbox.io/s/redux-query-hacker-news-sample-in-typescript-ufl2n Looks correct?
Looks great! I will open this as a PR to the docs and readme in the next few days. This is a super valuable example and we definitely appreciate the help.
This is the hacker-news sample implemented in TypeScript with strict compilation. Important passages are commented with guidance. The sample builds on the react toolkit's CRA typescript template.