Sidebar fetch data on click #71585
Unanswered
enzzzooo
asked this question in
App Router
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I have a grid of items.
On item click opens a floating sidebar
Which has more info about the specific item. The additional info can be fetched in the grid, but I would like to only fetch additional info on click as a performance optimization, for example an image. Then, display it as server rendered {children} in the sidebar.
For example:
Grid(){
}
Item({item}){
How would I be able to pass the clicked item.id to the sidebar and render the additional item data on the server?
This is defintely a nextjs question of server vs client. Since my data is only available based on the click of a list of options (items) is this sidebar forced to be server?
Beta Was this translation helpful? Give feedback.
All reactions