Import css in react js

const Header = () => { return ( <> <h1 style={{backgroundColor: "lightblue"}}>Hello Style!</h1> <p>Add a little style!</p> </> ); } const Header = () => { const myStyle = {…

0 Comments

Jquery Inside React js

npm install jquery --save npm i --save-dev @types/jquery import $ from 'jquery'; // jquery code here $("button").click(function(){ $.get("demo_test.asp", function(data, status){ alert("Data: " + data + "\nStatus: " + status); });…

0 Comments

Data Fetching By API in react js

A. In Class Component componentDidMount() {   fetch('http://127.0.0.1:8000/admin/menu-data')   .then((response) => response.json())   .then(CategoryList => {       this.setState({ menusData: CategoryList });   }); }   A. In Functional…

0 Comments

Props in class component in react js

A. App.js import './components/common/css/Header.css'; import ClassComponent from './components/ClassComponent/ClassComponent'; function App() { return (   <div className="App">        <ClassComponent name="Pankaj Kumar Loniya" age="28" />   </div> ); } export…

0 Comments