skip to Main Content

Javascript – Not able to see data i've passed through an array. No error when checked in console too,it shows an empty array in console. (Im not using API)

ProductDetails.jsx ProductDetailList.jsx I'm currently working on a React project where I'm rendering product and delivery details using components. I have two components: ProductDetailsList.jsx and ProductDetails.jsx. ProductDetailsList.jsx contains an array of product details and an array of delivery details, which are…

VIEW QUESTION

Javascript – Cannot read property 'pathname' of undefined Error

I am creating application in react using router below is my code main.jsx import React from 'react' import ReactDOM from 'react-dom/client' import App from './App.jsx' import './index.css' import { Router} from 'react-router-dom' ReactDOM.createRoot(document.getElementById('root')).render( <React.StrictMode> <Router> <App/> </Router> </React.StrictMode> ) app.jsx…

VIEW QUESTION

Javascript – How do I transfer the sorting type between components to sort products in ascending or descending order?

I have three components: Parent (HomePage.jsx) export default function HomePage() { const [currentSorting, setCurrentSorting] = useState(); return ( <> <IntroSlider /> <main className="main-content"> <MainContentHeader setSorting={setCurrentSorting} /> <ProductSection currentFuncOfSorting={currentSorting} /> </main> </> ); } Child(ProductSection.jsx) export default function ProductSection({ currentFuncOfSorting })…

VIEW QUESTION
Back To Top
Search