-->

ABOUT US

Our development agency is committed to providing you the best service.

OUR TEAM

The awesome people behind our brand ... and their life motto.

  • Kumar Atul Jaiswal

    Ethical Hacker

    Hacking is a Speed of Innovation And Technology with Romance.

  • Kumar Atul Jaiswal

    CEO Of Hacking Truth

    Loopholes are every major Security,Just need to Understand it well.

  • Kumar Atul Jaiswal

    Web Developer

    Techonology is the best way to Change Everything, like Mindset Goal.

OUR SKILLS

We pride ourselves with strong, flexible and top notch skills.

Marketing

Development 90%
Design 80%
Marketing 70%

Websites

Development 90%
Design 80%
Marketing 70%

PR

Development 90%
Design 80%
Marketing 70%

ACHIEVEMENTS

We help our clients integrate, analyze, and use their data to improve their business.

150

GREAT PROJECTS

300

HAPPY CLIENTS

650

COFFEES DRUNK

1568

FACEBOOK LIKES

STRATEGY & CREATIVITY

Phasellus iaculis dolor nec urna nullam. Vivamus mattis blandit porttitor nullam.

PORTFOLIO

We pride ourselves on bringing a fresh perspective and effective marketing to each project.

  • How to use map function in reactjs ?

     


    how to use map function in reactjs ?




    Today in this blog, we will aware about map function means we are used to data mapping using reactjs map() function. So, without wasting any time lets do it but lets recap what is exactly React js. 




    React



    Certainly! ReactJS is a JavaScript library developed by Facebook for building user interfaces. It allows developers to create reusable UI components and efficiently manage the state of their applications. Here are some key aspects of ReactJS:
     

    Component-Based Architecture: ReactJS follows a component-based architecture, where the user interface is divided into small, reusable components. Components encapsulate their own logic, state, and rendering, making it easier to build and maintain complex user interfaces.
     

    Virtual DOM: ReactJS uses a virtual representation of the DOM (Document Object Model), known as the Virtual DOM. When the state of a component changes, React updates the Virtual DOM.

     

    JSX: JSX is a syntax extension for JavaScript used in React. It allows developers to write HTML-like code within JavaScript, making it easier to describe the structure and appearance of components. JSX code is transpiled to regular JavaScript using tools like Babel before being executed in the browser.


     

    Hooks: React introduced Hooks in version 16.8 as a way to use state and other React features in functional components. Hooks allow developers to write reusable logic and manage state within functional components without the need for class components. The most commonly used hooks are useState for managing state and useEffect for handling side effects such as fetching data or subscribing to events.

     

    React Router: React Router is a popular routing library for React applications. It enables developers to create single-page applications with multiple views and handles routing between different components based on the URL.
     


    State Management: React provides a flexible ecosystem of state management solutions. While React's built-in state management (useState ) is suitable for managing local component state, more complex applications may benefit from additional state management libraries like Redux. These libraries help manage global application state and provide predictable ways to update and access the state.


    ReactJS has gained widespread popularity due to its performance, reusability, and declarative approach to building user interfaces. It has large community. 





    NOTE - Here we will Tailwind CSS for designing.



    Map function 



    The map() function is a higher-order function in JavaScript that is used to transform elements of an array. It creates a new array by calling a provided function on each element of the original array and storing the results in the new array. The original array remains unchanged.




    Here we are two file so one of the name is Data.jsx, in this file we have a data like name, rollno, class etc  and at the end of the code in this file we will export like ( export default Users; ) just because of we can import this file in another file for data mapping in our program.


    Data.jsx


      const Users=[
        {
            "name":"Akku",
            "rollNo":"123"
        },
        {
            "name":"Khushboo",
            "rollNo":"124"
        },
        {
            "name":"Atul",
            "rollNo":"125"
        },{
            "name":"Khushi",
            "rollNo":"126"
        },
        {
            "name":"Golu",
            "rollNo":"127"
        
        },
        {
            "name":"Atul",
            "rollNo":"128"
        },
        ]
        export default Users;
     


    Now, we will create another file called Themap.jsx 


    import Users from "../components/Data"
      
    function Themap() {
     
      return (
        <div>
        <div>
         
         {Users.map((e) => {
            console.log(Users);
            return (
     
               <ul  className='m-10 pt-3 pb-3 pl-5  pr-5 border-2 border-black'>
              
                <li>{e.name}</li>
                <li>{e.rollNo}</li>
                
               </ul>
            );
         })}
     
        </div> 
        </div>
     
      )
    }
    
    export default Themap
    
    
    


    Lets explain whats going here so there is some little bit code like import the data.jsx file, import react from "react", and most of the important
    thing that we are using funcitonal component in this react program apart form that we can use also class component but we only used here functional component
    so lets go ahead.




    # The import React from 'react' statement imports the necessary dependencies for a React component.

    # The import Users from "../components/Data" statement imports a module or file named Users from the "../components/Data" directory. It is assumed that this file contains an array of user data.

    # The Themap function is the main component function. It returns JSX elements that will be rendered to the DOM.

    # Inside the component's return statement, the Users.map() method is used to iterate over each element in the Users array.

    # For each element (e) in the Users array, a JSX code block is returned. It renders a <ul> element with the class names "m-10 pt-3 pb-3 pl-5 pr-5 border-2 border-black" and two list items <li> containing the name and rollNo properties of the current element (e).
    # The rendered JSX code blocks are then rendered within a parent <div> element.
    # The Themap component is exported as the default export of the module, making it available for other parts of the application to import and use.



    At the end we will call Themap.jsx file in app.jsx 





    Output







    Disclaimer


    All tutorials are for informational and educational purposes only and have been made using our own routers, servers, websites and other vulnerable free resources. we do not contain any illegal activity. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. Hacking Truth is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used. We do not promote, encourage, support or excite any illegal activity or hacking. 



  • How to get users input value by users automatically and manually

     

    How to get users input value by users automatically and manually



    Today in this blog, we will aware about get input box value means how to get input user value by automatically or when use click on submit button by using reactjs. So, without wasting any time lets do it but lets recap what is exactly React js. 



    React


    Certainly! ReactJS is a JavaScript library developed by Facebook for building user interfaces. It allows developers to create reusable UI components and efficiently manage the state of their applications. Here are some key aspects of ReactJS:

     


    Component-Based Architecture: ReactJS follows a component-based architecture, where the user interface is divided into small, reusable components. Components encapsulate their own logic, state, and rendering, making it easier to build and maintain complex user interfaces.

     


    Virtual DOM: ReactJS uses a virtual representation of the DOM (Document Object Model), known as the Virtual DOM. When the state of a component changes, React updates the Virtual DOM.

     


    JSX: JSX is a syntax extension for JavaScript used in React. It allows developers to write HTML-like code within JavaScript, making it easier to describe the structure and appearance of components. JSX code is transpiled to regular JavaScript using tools like Babel before being executed in the browser.


     

    Hooks: React introduced Hooks in version 16.8 as a way to use state and other React features in functional components. Hooks allow developers to write reusable logic and manage state within functional components without the need for class components. The most commonly used hooks are useState for managing state and useEffect for handling side effects such as fetching data or subscribing to events.

     


    React Router: React Router is a popular routing library for React applications. It enables developers to create single-page applications with multiple views and handles routing between different components based on the URL.

     


    State Management: React provides a flexible ecosystem of state management solutions. While React's built-in state management (useState ) is suitable for managing local component state, more complex applications may benefit from additional state management libraries like Redux. These libraries help manage global application state and provide predictable ways to update and access the state.


    ReactJS has gained widespread popularity due to its performance, reusability, and declarative approach to building user interfaces. It has large community. 


    NOTE - Here we will Tailwind CSS for designing.


    Get user Input Value by automatically



    import React, { useState } from 'react'

    function Getvalue() {
    
        const [data, setData] = useState(null);
        const [print, setPrint] = useState(false);
    
        function getdata(val) {
            console.log(val.target.value);
            setData(val.target.value)
        }
      return (
        <div>
        
        
        <div className=" grid  grid-cols-1 lg:grid-cols-1  md:grid-cols-1 sm:grid-cols-1  ">     
     <div className="h-auto md:grid-cols-6 ml-36   text-center md:grid-rows-6">
     
     
      <div className="mx-auto mt-36   w-80">
      <form   className="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4">
          
        <div className="mb-1">
          <input type="text" className="shadow appearance-none border border-red-500 rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline" onChange={getdata}  />
         </div>
         
          <div>{data}     </div> 
     
     
        
      </form>
      </div>
      </div> 
       
       
    </div>
    </div>
      
      )
    }
    
    export default Getvalue
    




    1) The import React, { useState } from 'react' line imports the React library and the useState hook, which allows functional components to have state.


    2) The Getvalue function is the React component that will be rendered.


    3) Inside the component, there is a state variable data defined using the useState hook. data is initially set to an empty string.


    4) The getdata function is defined to update the data state variable with the value entered in the input field. It logs the entered value to the console and updates the state using the setData function.


    5) The return statement contains the JSX code that defines the component's UI.


    6) The JSX code renders a <div> element that wraps the form.


    7) Inside the <form> element, there is an <input> element of type "text" that binds the getdata function to the onChange event. This means that whenever the input value changes, the getdata function will be called.


    8) There is a <div> element that displays the data value, which is the value entered in the input field. This element is updated automatically as the state changes.


    9) The component ends with closing tags to close the JSX elements and functions.


    10) Finally, the component is exported using export default Getvalue to make it available for use in other parts of the application.


    In summary, this simplified code creates a form with an input field. When the user enters a value, it is stored in the data state variable. The entered value is displayed below the input field in real-time as the state updates.



    output






    Get user Input Value by manually


    Here we can add another state so  and print is initially set to false and updates the state using the setPrint function.


    const [print, setPrint] = useState(false);


    and Add a button when user click on it then value get it and page refreshing...so  this updates the print state variable to true.



    <button onClick={() => setPrint(true)} className='' >Get Value</button>
    

    Following the button, there is a conditional rendering logic using a ternary operator. If print is true, it renders a <h1> element with the data value inside. Otherwise, it renders null.


    {
      print ?
      <div><h1> {data}</h1> </div>: null
    }
    


    Whole Code 



    import React, { useState } from 'react'
    
    function Getvalue() {
    
        const [data, setData] = useState(null);
        const [print, setPrint] = useState(false);
    
        function getdata(val) {
            console.log(val.target.value);
            setData(val.target.value)
        }
      return (
        <div>
        
        
        <div className=" grid  grid-cols-1 lg:grid-cols-1  md:grid-cols-1 sm:grid-cols-1  ">     
     <div className="h-auto md:grid-cols-6 ml-36   text-center md:grid-rows-6">
     
     
      <div className="mx-auto mt-36   w-80">
      <form   className="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4">
          
        <div className="mb-1">
          <input type="text" className="shadow appearance-none border border-red-500 rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline" onChange={getdata}  />
         </div>
         
         {/* <div>{data}     </div> */}
     
         <div className="mb-1">
         <button onClick={() => setPrint(true)} className='bg-green-600 text-white pt-1 pb-1 pr-3 pl-3 rounded-full'>Get Value</button>
          </div>
          
          {
            print ?
            <div><h1> {data}</h1> </div>: null
          }
    
      </form>
      </div>
      </div> 
       
       
    </div>
    </div>
      
      )
    }
    
    export default Getvalue
    


    Output






    Disclaimer


    All tutorials are for informational and educational purposes only and have been made using our own routers, servers, websites and other vulnerable free resources. we do not contain any illegal activity. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. Hacking Truth is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used. We do not promote, encourage, support or excite any illegal activity or hacking. 



  • how to pass data parent to child component using reactjs


    how to pass data parent to child component using reactjs



    Today in this blog, we will aware about Props means (short for properties) are used to pass data from a parent component to a child component by using reactjs. So, without wasting any time lets do it but lets recap what is exactly React js. 



    how to pass data parent to child component using reactjs


    React


    Certainly! ReactJS is a JavaScript library developed by Facebook for building user interfaces. It allows developers to create reusable UI components and efficiently manage the state of their applications. Here are some key aspects of ReactJS:
     

    Component-Based Architecture: ReactJS follows a component-based architecture, where the user interface is divided into small, reusable components. Components encapsulate their own logic, state, and rendering, making it easier to build and maintain complex user interfaces.
     

    Virtual DOM: ReactJS uses a virtual representation of the DOM (Document Object Model), known as the Virtual DOM. When the state of a component changes, React updates the Virtual DOM.
     

    JSX: JSX is a syntax extension for JavaScript used in React. It allows developers to write HTML-like code within JavaScript, making it easier to describe the structure and appearance of components. JSX code is transpiled to regular JavaScript using tools like Babel before being executed in the browser.

     
    Hooks: React introduced Hooks in version 16.8 as a way to use state and other React features in functional components. Hooks allow developers to write reusable logic and manage state within functional components without the need for class components. The most commonly used hooks are useState for managing state and useEffect for handling side effects such as fetching data or subscribing to events.
     

    React Router: React Router is a popular routing library for React applications. It enables developers to create single-page applications with multiple views and handles routing between different components based on the URL.
     

    State Management: React provides a flexible ecosystem of state management solutions. While React's built-in state management (useState ) is suitable for managing local component state, more complex applications may benefit from additional state management libraries like Redux. These libraries help manage global application state and provide predictable ways to update and access the state.

    ReactJS has gained widespread popularity due to its performance, reusability, and declarative approach to building user interfaces. It has large community. 


    NOTE - Here we will Tailwind CSS for designing.



    Here's an overview of how props work in React:


    Parent Component: The parent component is responsible for defining and passing the props to its child component(s).

    Child Component: The child component receives the props passed from its parent and uses them to configure its behavior and render content dynamically.

    Prop Passing: Props are passed as attributes to the child component when it is rendered within the parent component's JSX.

    Accessing Props: Inside the child component, the props can be accessed as an object, and the values can be accessed using dot notation (e.g., props.name, props.age, etc.).



    Example:


    Parent Component:



    import React from 'react'; 
    import ChildProps from './ChildProps';
    
    function ParentProps() {
      const name = 'Kumar Atul Jaiswal';
      const age = 24;
    
      return (
        <div>
          <ChildProps name={name} age={age} />
        </div>
      );
    }
    
    export default ParentProps;
    






    Child Component



    import React from 'react';
    
    function ChildProps(props) {
      return (
        <div>
          <h1>Name: {props.name}</h1>
          <p>Age: {props.age}</p>
        </div>
      );
    }
    
    export default ChildProps;
    
    
    


    The ParentComponent renders the ChildComponent and passes two props: name and age. The child component receives these props as an object (props) and uses them to render dynamic content. The child component can access the name and age props using props.name and props.age, respectively.

    Props are read-only, meaning that the child component cannot modify the props directly. They are used to provide information and configuration to the child component from its parent. If the parent component needs to update the data passed to the child component, it can do so by changing the prop values in its own state and triggering a re-render of the child component with the updated props.


    And ParentProps component call in App.jsx 


    // import Profile from "./components/Profile"
    import { Route, Routes } from "react-router-dom";
    import ParentProps from "./components/ParentProps";
    
    export default function App() {
      return (
    
        <>
     
    <ParentProps />
    
        </>
      )
    }
    
    



    Output 



    how to pass data parent to child component using reactjs





    Disclaimer


     
    All tutorials are for informational and educational purposes only and have been made using our own routers, servers, websites and other vulnerable free resources. we do not contain any illegal activity. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. Hacking Truth is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used. We do not promote, encourage, support or excite any illegal activity or hacking. 


  • npm react toastify in reactjs


     

    A Pure Javascript Library

     

    React Toastify is a popular library for creating toast notifications in React applications. It provides a simple and customizable way to display temporary messages or alerts to the user.

    To use React Toastify, you need to install the library first. You can do this by running the following command in your React project directory:
     

    npm i react-toastify

     

    Once the installation is complete, you can import the necessary components and start using React Toastify in your application. Here's an example of how you can display a basic toast notification:

     

    import React from "react";
    import { ToastContainer, toast } from "react-toastify";
    import "react-toastify/dist/ReactToastify.css";
    
    function Thetoastify() {
      const login = () => {
        toast("Login Successful");
      };
    
      const signup = () => {
        toast.success("Registration Successfull", {
          position: "top-left",
        });
      };
      return (
        <div>
          <div className=" flex justify-center  mt-56 space-x-5 text-white">
            <button
              className=" bg-blue-600 pt-2 pb-2 pr-5 pl-5  rounded-md cursor-pointer "
              onClick={login}
            >
              Login
            </button>
    
            <button
              className=" bg-blue-600 pt-2 pb-2 pr-5 pl-5  rounded-md cursor-pointer "
              onClick={signup}
            >
              Signup
            </button>
          </div>
    
          <ToastContainer position="top-right" />
        </div>
      );
    }
    
    export default Thetoastify;
    
    

     

     

     

     In this example, we import the ToastContainer and toast components from 'react-toastify'.If you want you can also import the CSS file for styling the toast notifications.

    Inside the Thetostify function, we define a notify function that calls the toast function with the desired message or login successfull message. When the button is clicked, it triggers the notify function, which displays the toast notification.

     

    Now we are calling <Thetoastify /> component in App.js file.

     

     

    import { Route, Routes } from "react-router-dom";
    import Thetoastify from "./components/Thetoastify";
    import Navbar from "./components/Navbar";
    
    
    
    
    
    export default function App() {
      return (
        <>
     <Navbar />
        <Routes>
         
          <Route path='/' element={<Thetoastify />} />
      
        </Routes>
    
        </>
      )
    }
    

     



    The ToastContainer component is used to wrap all the toast notifications. It should be placed once in your application, typically at the root level, to ensure the toasts are rendered properly.

    You can customize the appearance and behavior of the toast notifications by passing different options to the toast function or by using the ToastContainer component's props. The React Toastify documentation provides more information on the available options and customization possibilities.

    Remember to add the ToastContainer component to your application's layout or root component so that it can render the toast notifications correctly.

    That's a basic example of using React Toastify in your React application. You can explore more features and options offered by the library to enhance your toast notifications further.


    Result

      


     

    Disclaimer

     

    All tutorials are for informational and educational purposes only and have been made using our own routers, servers, websites and other vulnerable free resources. we do not contain any illegal activity. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. Hacking Truth is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used. We do not promote, encourage, support or excite any illegal activity or hacking.

     

     

  • About Google Bard

     


     

    Google Bard is a large language model (LLM) chatbot developed by Google AI. It is trained on a massive dataset of text and code, and can generate text, translate languages, write different kinds of creative content, and answer your questions in an informative way. Bard is still under development, but it has learned to perform many kinds of tasks, including

    •     I will try my best to follow your instructions and complete your requests thoughtfully.
    •     I will use my knowledge to answer your questions in a comprehensive and informative way, even if they are open ended, challenging, or strange.
    •     I will generate different creative text formats of text content, like poems, code, scripts, musical pieces, email, letters, etc. I will try my best to fulfill all your requirements.


    Bard is available in English, Japanese, and Korean. It can be accessed through the Google Bard website or through the Google Assistant.

     


     



    Bard is still under development, and it is important to remember that it is not perfect. It may sometimes give inaccurate or inappropriate responses. If you encounter any problems with Bard, please report them to Google so that they can be fixed.

     





     

    Bard is a powerful tool that can be used for a variety of purposes. It can be used for research, education, entertainment, and more. Bard is still under development, but it has the potential to be a valuable asset to anyone who uses it.

     




    Here are some of the things that Bard can do:

    •     Answer your questions in an informative way, even if they are open ended, challenging, or strange.
    •     Generate different creative text formats of text content, like poems, code, scripts, musical pieces, email, letters, etc.
    •     Translate languages.
    •     Write different kinds of creative content.
    •     Code.
    •     Solve math problems.
    •     Help you with your writing needs.
    •     And much more!


     


     

    Bard is still under development, but it has the potential to be a powerful tool for anyone who uses it.

     

     Thank you.

     

     

     

  • Multiplication table of user input in React js

     

    Multiplication table of user input in React js

     

    Multiplication table of user input in React js

     

    Today in this blog we will aware about Multiplication table means how to generate table of 5, 6, 7, 8 etc in react js but this time we will generate table by user input so dont waste time lets do it but lets recap what is exactly React js.


    React

    Certainly! ReactJS is a JavaScript library developed by Facebook for building user interfaces. It allows developers to create reusable UI components and efficiently manage the state of their applications. Here are some key aspects of ReactJS:
     

    Component-Based Architecture: ReactJS follows a component-based architecture, where the user interface is divided into small, reusable components. Components encapsulate their own logic, state, and rendering, making it easier to build and maintain complex user interfaces.
     

    Virtual DOM: ReactJS uses a virtual representation of the DOM (Document Object Model), known as the Virtual DOM. When the state of a component changes, React updates the Virtual DOM.
     

    JSX: JSX is a syntax extension for JavaScript used in React. It allows developers to write HTML-like code within JavaScript, making it easier to describe the structure and appearance of components. JSX code is transpiled to regular JavaScript using tools like Babel before being executed in the browser.

     
    Hooks: React introduced Hooks in version 16.8 as a way to use state and other React features in functional components. Hooks allow developers to write reusable logic and manage state within functional components without the need for class components. The most commonly used hooks are useState for managing state and useEffect for handling side effects such as fetching data or subscribing to events.
     

    React Router: React Router is a popular routing library for React applications. It enables developers to create single-page applications with multiple views and handles routing between different components based on the URL.
     

    State Management: React provides a flexible ecosystem of state management solutions. While React's built-in state management (useState ) is suitable for managing local component state, more complex applications may benefit from additional state management libraries like Redux. These libraries help manage global application state and provide predictable ways to update and access the state.

    ReactJS has gained widespread popularity due to its performance, reusability, and declarative approach to building user interfaces. It has large community.



    NOTE - Here we will Tailwind CSS for designing..


    Generating Table

     

    To create a multiplication table of 5 in ReactJS based on user input, you can follow these steps:
     

    # Set up a React component with a state to track the user input and the resulting multiplication table.
    # Render an input field where the user can enter a number.
    # Add an event handler to capture the user input and update the component's state.
    # Use the entered number to generate the multiplication table and store it in the component's state.
    # Render the multiplication table below the input field.

    Here's an example implementation:



    import React, { useState } from 'react'
    
    function Table() {
    
    const [number, gettbl] = useState('');
    
    const rows = [];
        for(let i = 1; i <= 10; i++)
        {
        rows.push(
            <tr key={i}> 
            <td className='text-red-600 ' >{number} * {i} =  {i * number }</td>
           
            </tr>
        );
        }
    
    for(let i = 1; i <= 10; i++) {
        const result = i * number;
        console.log(`${number} * ${i} = ${result}`);
    }
         
    const getTable = (event) => {
        gettbl(event.target.value);   // for updating the value
    }
    
      
    
      return (
        <div className="">
        <div className="grid justify-center  grid-cols-1 lg:grid-cols-2 gap-2 mt-48  h-96 ml-[40%]  ">
           
          <div className="w-full max-w-xs mt-auto md:grid-rows-6 ">
    <form className="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4"
    
    >
      <div className="mb-4">
        
        
        <label className="block text-gray-700 text-sm font-bold mb-2" htmlFor="number">
        Number
        </label>
    
        <input className="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" 
        type="number" 
        placeholder="Enter Number For Table" 
        onChange={getTable }
        name="number"
         /> 
    
      </div>
      <div className='mt-3 flex px-auto  ' >
      <p>{rows}</p>
      </div>
    </form>
     
    </div>
        </div>
      </div>
    );
    }
       
    export default Table
    



     


     

    This component maintains the "number" state to store the user input and the "gettbl" state to store the generated multiplication table. The "getTable" function is called whenever the user enters a number. It updates the number state and generates the multiplication table using the "Table" function. The resulting table is stored in the table state and rendered in the table element below the input field.


    Here rows.push is that Appends new elements to the end of an array, and returns the new length of the array.   

    Remember to include this component in your main application and render it where desired.

     

     

    Read More - How to add loader or spinner in react js?


    Disclaimer

     

    All tutorials are for informational and educational purposes only and have been made using our own routers, servers, websites and other vulnerable free resources. we do not contain any illegal activity. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. Hacking Truth is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used. We do not promote, encourage, support or excite any illegal activity or hacking.

     

     

  • How to add loader or spinner in reactjs

     

    How to add loader or spinner in reactjs

     

    How to add loader or spinner in reactjs


    React Loader Spinner is a library for adding loading spinners or progress indicators to React applications. It provides a set of customizable spinner components that can be used to indicate that a particular operation is in progress, such as loading data or performing an asynchronous task.


    React Loader Spinner offers a wide range of spinner types, including classic spinners like a circle or bar, as well as more complex ones like a pulsating circle or a rotating cube. The library is highly configurable, allowing you to customize the size, color, and animation speed of the spinners.


    React Loader Spinner is designed to be easy to use and integrate into React projects. It can be installed via npm and imported into your React components. Once imported, you can simply add the desired spinner component to your JSX code and configure its props to suit your needs.
    In summary, React Loader Spinner is a useful library for adding loading spinners to React applications, providing a variety of customizable spinner types and making it easy to integrate them into your code.
     

    To add a loader spinner in a React project, you can use an existing library like react-loader-spinner or create your own spinner component.

    Here's an example of how to use the react-loader-spinner library:

     

     First Search on Browser "React loader spinner"

     

     

    How to add loader or spinner in reactjs

     

    then as you can see there, there is a first link of npmjs.com, open it. But dont worry i will provide you direct link (check below)

    https://www.npmjs.com/package/react-loader-spinner

     

     
    After opening it, this is a page of npmreactjs official site so where we can install any type of package library so copy from here pkg

    npm i react-loader-spinner

     

    How to add loader or spinner in reactjs

     

     

     
    Then, in your vs code terminal paste it and install it

     

     

    How to add loader or spinner in reactjs

     

     So as you can see installation done so whether is it install or not to check it in your "package.json"

     

    How to add loader or spinner in reactjs

     

     

     Now finally after installation of pkg library we will follow some steps to complete the project

    Step 1 - Then, we will do all type of coding in "App.jsx" file. So import the pkg first. 


    import { Circles } from 'react-loader-spinner';



    Step 2 - Now  we will use useEffect() hooks inside "function App()" and useState() too.



      const [loading, setLoading] = useState(false)
      useEffect(() => {
        setLoading(true)
        setTimeout(() => {
          setLoading(false)
        }, 2000)
      }, [])
    
    
    



    This code will render a TailSpin spinner with timeout of 2 seconds (1000 ms = 1 sec).



    Step 3 - Now we import useState and useEffect after importing react-loader-spinner


    import { useState, useEffect } from 'react';


    Step 4 - Now inside return, we will write react loader circle and adding some content for displaying after loading the circle spinner.



    <div className='App'>
    {
     loading ? 
     <Circles color={'#D0021B'} loading={loading} size={100} />
     :
    
      <div>
      <h1>Hello World </h1/>
      <p>Myself Kumar Atul Jaiswal CEO and Founder of Hacking Truth. </p>
     </div>
    }
    
    
    </div>
    




    This code will render a TailSpin spinner with #D0021B color, 100px height and width and loading is true when your page is refreshing.


    Full Code



    import React from 'react'
    import { Circles } from 'react-loader-spinner';
    import { useState, useEffect } from 'react';
    
    
    function App() {
    
      const [loading, setLoading] = useState(false)
      useEffect(() => {
        setLoading(true)
        setTimeout(() => {
          setLoading(false)
        }, 2000)
      }, [])
     
    
    
      return (
        <div>
         
         
       <div className='App'>
       {
        loading ? 
        <Circles color={'#D0021B'} loading={loading} size={100} />
        :
    
        <div className='flex-1' >
        <h1>Hello World</h1>
        <p>Myself Kumar Atul Jaiswal CEO and Founder of Hacking Truth and She is miss Khushboo Kashyap Co-Founder of Hacking Truth</p>
        </div>
       }
    
     
      </div>
     
        
        </div>
      )
    }
    
    export default App
    



    How to add loader or spinner in reactjs


    Result -


    How to add loader or spinner in reactjs


    If you have any components... so use it like this



    import Navbar from './components/Navbar';
    import { Route, Routes } from "react-router-dom";
    import Discover from "./components/Discover";
    
    import Signin from "./components/Signin";
    import Dashboard from './components/Dashboard';
    import Profileupdating from './components/Profileupdating';
    
    import 'react-toastify/dist/ReactToastify.css';
    
    import { Circles, ThreeDots  } from 'react-loader-spinner';
    import { useEffect, useState } from 'react'; 
    
    
    function App() {
    
      const [loading, setLoading] = useState(false)
      useEffect(() => {
        setLoading(true)
        setTimeout(() => {
          setLoading(false)
        }, 2000)
      }, [])
     
    
    
      return (
        <div>
         
         
       <div className='App'>
       {
        loading ? 
        <Circles color={'#D0021B'} loading={loading} size={100} />
        :
    
       
       
        <>
    
        <Navbar />
    
    <Routes>
      {/* <Route path='/' element={ <Home /> } /> */}
      <Route path='/' element={<Signin />} />
      <Route path='/discover' element={<Discover /> } />
    
      <Route path='/dashboard' element={<Dashboard />} />
      <Route path='/signin/:id' element={<Signin /> } />
      <Route path='/profileupdating/:id' element={<Profileupdating /> } />
      
       
    </Routes>
    
    </>
    
       }
    
     
      </div>
     
        
        </div>
      )
    }
    
    export default App
    
    




    Disclaimer

     

    All tutorials are for informational and educational purposes only and have been made using our own routers, servers, websites and other vulnerable free resources. we do not contain any illegal activity. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. Hacking Truth is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used. We do not promote, encourage, support or excite any illegal activity or hacking.

     

     

  • WHAT WE DO

    We've been developing corporate tailored services for clients for 30 years.

    CONTACT US

    For enquiries you can contact us in several different ways. Contact details are below.

    Hacking Truth.in

    • Street :Road Street 00
    • Person :Person
    • Phone :+045 123 755 755
    • Country :POLAND
    • Email :contact@heaven.com

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.