DEV Community

Muhammad Sibtain
Muhammad Sibtain

Posted on

How to go to next post using Link href="" in next js?

the next button is creating an issue for me , i have an array of object and want to access it , but it gives undefined. i want to go on URL as localhost:3000/blog/6. and i have 6 objects in an array. but when i write blogDetails.id + 1 , it accross the my objects as which i do not want .URL becomes as : localhost:3000/blog/7

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay