<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Delwar Hossain</title>
    <description>The latest articles on DEV Community by Delwar Hossain (@delwarjnu11).</description>
    <link>https://dev.to/delwarjnu11</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F783039%2Ffa632431-77e2-4735-8c1d-86fd7325de0c.jpeg</url>
      <title>DEV Community: Delwar Hossain</title>
      <link>https://dev.to/delwarjnu11</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/delwarjnu11"/>
    <language>en</language>
    <item>
      <title>JSON WEB TOKEN(JWT)
 
  
</title>
      <dc:creator>Delwar Hossain</dc:creator>
      <pubDate>Thu, 30 Dec 2021 10:08:38 +0000</pubDate>
      <link>https://dev.to/delwarjnu11/json-web-tokenjwt-4ofk</link>
      <guid>https://dev.to/delwarjnu11/json-web-tokenjwt-4ofk</guid>
      <description>&lt;p&gt;JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. So in the tutorial, I introduce how to implement an application “Reactjs JWT token Authentication Example” with details step by step and 100% running sourcecode.&lt;br&gt;
– I give you an Epic of the application, a fullstack excutive flow from frontend to backend with overall architecture diagram.&lt;br&gt;
– I give you a layer diagram of Reactjs JWT Application.&lt;br&gt;
– I give you an implementatin of security backend sourcecode (SpringBoot + Nodejs JWT RestAPIs).&lt;br&gt;
– I guide you step by step how to develop a Reactjs JWT Authentication application.&lt;br&gt;
– Finally, I do an integrative testing from Reactjs JWT Authentication application to Backend Security RestAPIs&lt;br&gt;
For the Reactjs JWT Authentication tutorial, we have 2 projects:&lt;br&gt;
– Backend project (using SpringBoot or Nodejs Express) provides secured RestAPIs with JWT token.&lt;br&gt;
– Reactjs project will request RestAPIs from Backend system with the JWT Token Authentication implementation.&lt;/p&gt;

&lt;p&gt;User Registration Phase:&lt;br&gt;
– User uses a React.js register form to post user’s info (name, username, email, role, password) to Backend API /api/auth/signup.&lt;br&gt;
– Backend will check the existing users in database and save user’s signup info to database. Finally, It will return a message (successfully or fail) to&lt;br&gt;
User Login Phase:&lt;br&gt;
– User posts user/password to signin to Backend RestAPI /api/auth/signin.&lt;br&gt;
– Backend will check the username/password, if it is right, Backend will create and JWT string with secret then return it to Reactjs client.&lt;/p&gt;

&lt;p&gt;After signin, user can request secured resources from backend server by adding the JWT token in Authorization Header. For each request, backend will check the JWT signature and then returns back the resources based on user’s registered authorities.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>REACT COMPONENT LIFE CYCLE
 
  
</title>
      <dc:creator>Delwar Hossain</dc:creator>
      <pubDate>Thu, 30 Dec 2021 10:01:18 +0000</pubDate>
      <link>https://dev.to/delwarjnu11/react-component-life-cycle-3pfe</link>
      <guid>https://dev.to/delwarjnu11/react-component-life-cycle-3pfe</guid>
      <description>&lt;p&gt;Initialization: In this phase, the developer has to define the props and initial state of the component this is generally done in the constructor of the component. The following code snippet describes the initialization process.&lt;br&gt;
 Mounting: Mounting is the phase of the component lifecycle when the initialization of the component is completed and the component is mounted on the DOM and rendered for the first time on the webpage. Now React follows a default procedure in the Naming Conventions of these predefined functions where the functions containing “Will” represents before some specific phase and “Did” represents after the completion of that phase. The mounting phase consists of two such predefined functions as described below.&lt;br&gt;
componentWillMount() Function: As the name clearly suggests, this function is invoked right before the component is mounted on the DOM i.e. this function gets invoked once before the render() function is executed for the first time.&lt;br&gt;
componentDidMount() Function: Similarly as the previous one this function is invoked right after the component is mounted on the DOM i.e. this function gets invoked once after the render() function is executed for the first time&lt;br&gt;
Updation: React is a JS library that helps create Active web pages easily. Now active web pages are specific pages that behave according to their user. For example, let’s take the GeeksforGeeks {IDE} webpage, the webpage acts differently with each user. User A might write some code in C in the Light Theme while another User may write a Python code in the Dark Theme all at the same time. This dynamic behavior that partially depends upon the user itself makes the webpage an Active webpage. Now how can this be related to Updation? Updation is the phase where the states and props of a component are updated followed by some user events such as clicking, pressing a key on the keyboard, etc. The following are the descriptions of functions that are invoked at different points of Updation phase.&lt;br&gt;
componentWillReceiveProps() Function: This is a Props exclusive Function and is independent of States. This function is invoked before a mounted component gets its props reassigned. The function is passed the new set of Props which may or may not be identical to the original Props. Thus checking is a mandatory step in this regard. The following code snippet shows a sample use-case.&lt;br&gt;
setState() Function: This is not particularly a Lifecycle function and can be invoked explicitly at any instant. This function is used to update the state of a component. You may refer to this article for detailed information.&lt;br&gt;
shouldComponentUpdate() Function: By default, every state or props update re-render the page but this may not always be the desired outcome, sometimes it is desired that updating the page will not be repainted. The shouldComponentUpdate() Function fulfills the requirement by letting React know whether the component’s output will be affected by the update or not. shouldComponentUpdate() is invoked before rendering an already mounted component when new props or state are being received. If returned false then the subsequent steps of rendering will not be carried out. This function can’t be used in the case of forceUpdate(). The Function takes the new Props and new State as the arguments and returns whether to re-render or not.&lt;br&gt;
componentWillUpdate() Function: As the name clearly suggests, this function is invoked before the component is rerendered i.e. this function gets invoked once before the render() function is executed after the updation of State or Props.&lt;br&gt;
componentDidUpdate() Function: Similarly this function is invoked after the component is rerendered i.e. this function gets invoked once after the render() function is executed after the updation of State or Props.&lt;br&gt;
 Unmounting: This is the final phase of the lifecycle of the component that is the phase of unmounting the component from the DOM. The following function is the sole member of this phase.&lt;br&gt;
componentWillUnmount() Function: This function is invoked before the component is finally unmounted from the DOM i.e. this function gets invoked once before the component is removed from the page and this denotes the end of the lifecycle.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
