skip to Main Content

Reactjs – why my Import functions are not working in react?

IN header.js function header(){ return(<div className="header"><header><h1>Header Content</h1></header></div>); } export default header; IN footer.js function footer(){ return(<div className="footer"><footer>copyright 2022-23</footer></div>) } export default footer; **IN App.js** import React from 'react'; import header from './header'; import footer from './footer'; function App() { return…

VIEW QUESTION

Javascript – fetch post redirecting to api response body

I have the following code: const form = document.querySelector('form'); form.addEventListener('submit', handleSubmit()); async function handleSubmit(event) { const url = new URL(form.action); const formData = new FormData(form); @type {Parameters<fetch>[1]} const fetchOptions = { method: form.method, body: formData, }; const response = await…

VIEW QUESTION
Back To Top
Search