Refactoring (pages/) - client component fetching data on click
Unanswered
Griffon Nivernais posted this in #help-forum
Griffon NivernaisOP
At the moment I have [the following code](https://gist.github.com/cyrus01337/48b04d59b8327b6c4366e16e668a6ad4), don't mind what the imports or other components are for now, just assume everything is as it looks based on name alone. Is there any way that I can improve data-fetching given that this originated from the pages directory and am migrating over to the app directory?
6 Replies
Griffon NivernaisOP
Bump.
Griffon NivernaisOP
Bump.
Toyger
it look decent enough. why you want to improve it?
Griffon NivernaisOP
For future reference - incase there's a more ergonomic/concise way of doing this using say server components.
If there's no better and this is fine, I'll leave it as is though.
Griffon NivernaisOP
Decided to leave as is, thanks for the help! :)