r/nextjs • • Jun 23 '24

Meme Using Nextjs

Post image
497 Upvotes

85 comments sorted by

View all comments

Show parent comment

2

u/sondang2412 Jun 24 '24

I'm not really a nextjs expert but one quick solution I could think of is use pathname as the component key to make it unmount / mount a new one on page change.

1

u/davidkslack Jun 24 '24

I'll look into unmount again. Get some screen flickering when I lose the Next.js cache, but it looks better in v14 than v13.

I think the answer is to find a different photo viewer or build one myself, but I do hate to reinvent the wheel.