- Introducing React Paginating đđđToday, I am happy to announce a React Paginating component.gif react-paginating demoThere are some popular components which help us to solve pagination problem such as react-paginate, react-pager,Â âŚ Now there is another one.
- Itâs called react-paginating with a different approach.How âreact-paginatingâ is uses Function as Child Components pattern which allows a component to publish any variables, states or functions to the outside as input params of a function which is going to be used for handling logic and rendering the UI.Here are some…
- The formula to calculate totalPages:const totalPages = Math.ceil(total / limit);pageCountHow many pages you want to display.I.e:pageCount = 5with pageCount =Â 5pageCount = 9with pageCount =Â 9currentPageThe page currently you are visiting.
- The component calculates and publishes props which allow controlling UI.
- After that, you might put your CustomAnchor / somewhere on your âstorybookâ or components manager.DemoConclusionIf you see it is useful for you.
There are some popular components which help us to solve pagination problem such as react-paginate, react-pager, … Now there is another one. It’s called react-paginating with a different approach…
Continue reading “Introducing React Paginating 🎉🎉🎉 – Dzung Nguyen – Medium”