Pagination

In this article, You will learn how to make pagination without node modules. Yes, there are lots of node modules are there for pagination like mdbreact, react-js-pagination and etc…

If react has already in-build components then why we need to write a code for pagination? this question comes in your mind. right?

Yes, obviously everyone has comes this question in their mind. Sometimes need to create a code functions for pagination like our data structure is different to pagination component needs data structure or some clients are ask that no need to use components or need pagination on div structure…


What is react hooks?

Hooks are a new addition in React 16.8. React Hooks are function. You cannot use hooks in class component because they let you use React without classes. Using react hooks, totally avoid react lifecycle methods like componentWillMount, componentDidMount, etc… Instead of this methods we will use in-built hooks like useEffect.

React Hooks are functions that let us hook into the React state and lifecycle features from function components.

How can use react hooks with functional component?

useState:

here is simple example of react hooks.


Create Native app and run it into Expo.
Create Native app and run it into Expo.

What is React Native:

React native is a open-source mobile application framework created by facebook. It is used to develop application for android, iOS. React Native is another cross-app development framework that has accelerated the development process of apps.

If you are aware with ReactJS then React Native is easy to understand, Component and function call is the same.

How to create React Native app:

  1. Run this command to create Native expo app:

expo init <Your Native App Name>


You can easily get search functionality with algolia.

you can get Basics, Refinements, Results, Pagination, Sorting and Geo Search widgets for search. Listing searches are Done.

Lets Start to get Single Hit for Single product page.

  1. First, set redirect link from listing of products:


Currently React and React Native are very trending in developer world which is released by facebook Inc.

There are too many best editors for different different languages like Sublime, nuclide, atom, visualstudio code editors etc.

I am using visual studio code editor. It is fast, free, spend low memory editor.

I love this editor. There are many best things in this editor like:

  • Open folder in your editor.
  • Find replace string easily .
  • Change theme as per your choice.
  • Add extension for other language and new themes.
  • start terminal in your editor.
  • You can directly push your changes to github.

Before create or run react app should know npm or yarn is installed in your system?

If not then install npm from

https://nodejs.org/en/download/

And yarn from

https://yarnpkg.com/lang/en/docs/install/

Create react app:

Run below command for create new react app.

npx create-react-app my-first-react-app


ReactJs is most popular JavaScript library created by Facebook. Learning React is a new way to build front-end experiences like websites, mobile apps, and more.

Before start React project must know about ReactJs and why it is in trending today in development.

Why ReactJs?

ReactJS is an open-source, declarative, efficient, and flexible JavaScript library. which is used for building user interfaces specifically for single page applications.

The main benefit of React is to be fast, scalable, and simple.

React gives us the ability to logically think about our frontend sites and applications.

It’s also a really fun and quick way to build the projects.

React is works like magic! Just imagine changing in javascript…

Namrata Sanja

Web Developer. React, Redux (saga & thunk), React Native, Vuejs, gatsby, algolia, Antd, firebase

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store