React | Hooks
React | Hooks

Hooks are introduced in React 16.8. They allow to hook into React features such as component state and lifecycle method to be implemented in a functional component.

Previously when we have to achieve the functionalities in React like components state or lifecycle events we have to implement the class component but after hooks, they all can be achieved in a functional component without using class.

Hooks are the functions that allows to hook into the react feature such as state and lifecycle methods in a functional components.

I am discussing the following hooks in this article

  • useState
  • useEffect

I will…


Image
Image

In this article, I will share my knowledge of authenticating node.js server using passport.js and also a little stuff about protected routes and handle unauthorized requests.

I am using the following things.

  • Node.js
  • Express.js
  • passport.js
  • JWT

This article just gives you the basic understanding of authenticating users with passport.js and has nothing to relate to schema designing or other concepts using in node server.

The below paragraph is taken from the official website of passport.js

Passport is authentication middleware for Node.js. Extremely flexible and modular, Passport can be unobtrusively dropped into any Express-based web application. …

Talha nousher

Bachelors in Computer science. JavaScript developer, Working as MERN stack developer. Interested in writing tech articles related to node.js and react.

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