Fetch fails when reading session storage
I have a function, handlesubmit, that sends some data from a form to my backend/
How to fix TranslateX doesn’t work on slider?
const slider = useRef(); let tx = 0; const slideForward = () => { if (tx > -400) { tx -= 100; } slider.current.style.transform = `translateX(`${tx}%`)`; }; const slideBackward = () => {}; return ( <div className=”Customers”> <img src={nextIcon} alt=”” className=”nextIcon” onClick={slideForward} /> <img src={nextIcon} className=”backIcon” alt=”” onClick={slideBackward} /> {customerData.map((record) => ( <div key={record.id} className=”slider”> […]
react why ternary operator is not working inside jsx with context value
Please see below code ternary operator is not working in react inside jsx with value from context api
this challenge concerning state or props or whatever it’s called in React
import React from “react” export default function App() { const [messages, setMessages] = React.useState([“a”, “b”]) /** * Challenge: * – Only display the <h1> below if there are unread messages */ return ( <div> <h1>You have _ unread messages!</h1> </div> ) } this is the code and the challenge commented out, i have no idea […]