Welcome to part-28 of the series. In this part i will start with adding the logic to show current count of total blogs, next to search bar. We will also update the count, if someone searches in search bar.
Open the index.js file and add a variable postCount, which will get the total count of posts. After that add a new state variable filteredCount.
index.js
Rest of the chapter is exclusive content and is from my book Foundation Gatsby Projects.
The book can be purchased from Apress site here
It’s time to push the code to github for the automatic deployment in netlify. And our site thewebdev.tech is live after the deployment.
Site Live
This completes part-28 of the series.
You can find the code for the same in this github repo.