<?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>Forem: Riyad Mahmud</title>
    <description>The latest articles on Forem by Riyad Mahmud (@riyadmahmud2021).</description>
    <link>https://forem.com/riyadmahmud2021</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%2F747116%2F91334e21-e09d-4be5-bdf3-062caac9e1de.jpeg</url>
      <title>Forem: Riyad Mahmud</title>
      <link>https://forem.com/riyadmahmud2021</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/riyadmahmud2021"/>
    <language>en</language>
    <item>
      <title># Redux #Its Concepts and #Why Redux?</title>
      <dc:creator>Riyad Mahmud</dc:creator>
      <pubDate>Wed, 15 Dec 2021 14:38:21 +0000</pubDate>
      <link>https://forem.com/riyadmahmud2021/-redux-its-concepts-and-why-redux-3eb8</link>
      <guid>https://forem.com/riyadmahmud2021/-redux-its-concepts-and-why-redux-3eb8</guid>
      <description>&lt;p&gt;&lt;strong&gt;Redux&lt;/strong&gt; &lt;br&gt;
Redux is a predictable state container for js apps. Its a state management library. &lt;/p&gt;

&lt;p&gt;# Importancy:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- For js apps:
   - Can be used React, Angular, Vue or even vanilla js

- A state container:
   -  Redux stores the state of an application
   -  Consider a React App state of a component
   -  State of an app is the represented by all the individual components of that app
   -  Redux will store and manage the application state.
   -  A state container for js app  

- Predictable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Why Redux?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Can Manage the state of your application in a predictable way, redux can help you.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lifting a state up for far component is not better solution because component tree grows long. We can &lt;br&gt;
  solve this problem by storing state with Redux. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;State is controlled outside the components and if a component need to update its state need to&lt;br&gt;&lt;br&gt;
  communicates with the state container.     &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;*&lt;em&gt;Redux will be used opposite of useContext() and useReducer() *&lt;/em&gt;  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Three Core Concepts of Redux&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Store   =&amp;gt; A "store" that holds the state of a application. &lt;/li&gt;
&lt;li&gt;Action  =&amp;gt; An "action" that describes the changes on the state of the application.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Reducer =&amp;gt; A "reducer" which actually carries out the state transition depending on action. &lt;/p&gt;

&lt;p&gt;These three concepts contains three principle of Redux:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First Principle:
  The state of your application is stored in an object three within a single store. 
  Maintain our application state in a single object which would be managed by the Redux store.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Second Principle: &lt;br&gt;
  The only way to change the state is to emit an action, an object describing what happened.&lt;/p&gt;

&lt;p&gt;To update the state of your app, you need to let Redux know about that with an action. &lt;br&gt;
  Not allowed to directly update the state object. &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Third Principle:&lt;br&gt;&lt;br&gt;
 To specify how the state tree is transformed by actions, you write pure reducers.&lt;/p&gt;

&lt;p&gt;Reducer = (prevState, action) =&amp;gt; newState &lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Why we use useEffect? and  useEffect Hook more general knowledges</title>
      <dc:creator>Riyad Mahmud</dc:creator>
      <pubDate>Mon, 08 Nov 2021 19:31:52 +0000</pubDate>
      <link>https://forem.com/riyadmahmud2021/why-we-use-useeffect-and-useeffect-hook-more-general-knowledge-12j5</link>
      <guid>https://forem.com/riyadmahmud2021/why-we-use-useeffect-and-useeffect-hook-more-general-knowledge-12j5</guid>
      <description>&lt;h1&gt;
  
  
  Why we use useEffect?
&lt;/h1&gt;

&lt;h1&gt;
  
  
  -----------------------------------------------
&lt;/h1&gt;

&lt;p&gt;Ans: &lt;br&gt;
We use useEffect when we need to handle "side works/side effects" of related state. It happens after component rendering. Good Example, &lt;br&gt;
See the axios api here, we use this external api axios and its code in useEffect hook function. &lt;/p&gt;

&lt;p&gt;Don't forget these,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;side works = side-effects.&lt;/li&gt;
&lt;li&gt;"axios" is an external api.&lt;/li&gt;
&lt;li&gt;"useEffect" related to passing response for side-effects after rendering component. &lt;/li&gt;
&lt;li&gt;"dependency" of useEffect make sure that application side-effect need to act for given depency. &lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  useEffect Hook more general knowledges
&lt;/h1&gt;

&lt;h1&gt;
  
  
  -----------------------------------------------
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Perform side effects in function components.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using Effect
&lt;/li&gt;
&lt;li&gt;Data Fetching&lt;/li&gt;
&lt;li&gt;Manually changing the DOM&lt;/li&gt;
&lt;li&gt;API Calling &lt;/li&gt;
&lt;li&gt;Managing the outside world data&lt;/li&gt;
&lt;li&gt;Timer setting&lt;/li&gt;
&lt;li&gt;Replacement of
    - componentDidMount(), 
    - componentDidUpdate(),
    - componentDidUnmount()
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;useEffect(callback, [dependencies array]) is the hook that manages the side-effects in functional components. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Callback argument is a function to put the side-effect logic.&lt;/li&gt;
&lt;li&gt;Dependencies is a list of dependencies of your side-effect:

&lt;ul&gt;
&lt;li&gt;If we don’t pass dependency variable then useEffect hook will only called 
when our component is rendered.
&lt;/li&gt;
&lt;li&gt;If we pass an empty array to useEffect then our component will be rendered for first time 
when a component is rendered. To re-call useEffect hook we have to refresh our page. &lt;/li&gt;
&lt;li&gt;If we pass dependencies to useEffect hook,
then useEffect will executed every time passed variable data is updated.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;useEffect will run after every render.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Need to Use multiple useEffect for explaining multiple effects. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  -----------------------------------------------
&lt;/h1&gt;

&lt;p&gt;Best of Luck all of you.....&lt;/p&gt;

&lt;p&gt;Thanks to my loving teachers,&lt;br&gt;
Sumit Saha, HM Nayem, Vishwash, Anisul Islam, Rabbil Hasan Rupom&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>beginners</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Why useState??? and Some important basic things of React useState Hook,I have noticed....
</title>
      <dc:creator>Riyad Mahmud</dc:creator>
      <pubDate>Mon, 08 Nov 2021 19:21:57 +0000</pubDate>
      <link>https://forem.com/riyadmahmud2021/-why-usestate-and-some-important-basic-things-of-react-usestate-hooki-have-noticed-5ek2</link>
      <guid>https://forem.com/riyadmahmud2021/-why-usestate-and-some-important-basic-things-of-react-usestate-hooki-have-noticed-5ek2</guid>
      <description>&lt;h1&gt;
  
  
  -----------------------------------------------
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;"useState" related to taking/getting a state and updatingState function for any updating state.
           Ex: const [count,setCount] = useState(0); &lt;/li&gt;
&lt;li&gt;We can use any "premetive data" or "array object" for useState argument (argument not parameter)&lt;/li&gt;
&lt;li&gt;"premetive data" is more preferable for beginner&lt;/li&gt;
&lt;li&gt;"array object" is difficult to implement and understand the code for a beginner.&lt;/li&gt;
&lt;li&gt; Implemented argument in useState function," "premetive data" or "array object" " return two this such an state and state updating function. 
Ex: const [count,setCount] = useState(0); //Here , "count" is a state and "setCount" is a state updating function. "0" is a premetive data.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  -----------------------------------------------
&lt;/h1&gt;

&lt;p&gt;Best of Luck all of you.....&lt;/p&gt;

&lt;p&gt;Thanks to my loving teachers,&lt;br&gt;
Sumit Saha, HM Nayem, Vishwash, Anisul Islam, Rabbil Hasan Rupom &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>beginners</category>
      <category>javascript</category>
    </item>
    <item>
      <title>DOM (Document Object Model) is really easy to understand!!! 
 
</title>
      <dc:creator>Riyad Mahmud</dc:creator>
      <pubDate>Sun, 07 Nov 2021 16:30:03 +0000</pubDate>
      <link>https://forem.com/riyadmahmud2021/-what-is-dom-what-is-d-o-m-for-5g44</link>
      <guid>https://forem.com/riyadmahmud2021/-what-is-dom-what-is-d-o-m-for-5g44</guid>
      <description>&lt;h2&gt;
  
  
   1. What is DOM?
&lt;/h2&gt;

&lt;h2&gt;
  
  
   2. What is “D” “O” “M” for?
&lt;/h2&gt;

&lt;h2&gt;
  
  
   3. Is DOM same as HTML?
&lt;/h2&gt;

&lt;h2&gt;
  
  
   4. What is the relation between DOM and HTML?  
&lt;/h2&gt;




&lt;p&gt;Today, we will know 4 queries solution. These are above.&lt;br&gt;
Lets learn...&lt;/p&gt;

&lt;p&gt;DOM contains Document Object Model.&lt;br&gt;&lt;br&gt;
D for Document. &lt;br&gt;
It Means: HTML doc file &lt;/p&gt;

&lt;p&gt;O for Object. &lt;br&gt;
It Means: HTML element(body,head,p,h1,etc) / javascript object) &lt;br&gt;
We can say, HTML element(p,h1,etc) = javascript object.&lt;/p&gt;

&lt;p&gt;M for Model. &lt;br&gt;
It Means: HTML doc’s “element/ javascript object” Model&lt;/p&gt;

&lt;p&gt;DOM works as a “javascript object model”. Here, “javascript object” is known as  HTML element(p,h1,etc). Actually, DOM is an HTML element(p,h1) model. &lt;/p&gt;

&lt;p&gt;Best of luck.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>html</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
