Category : reactjs

I am trying to get data from local server but i am failure to connect local server.I am facing "Network request failed" const testScreen= async ()=> { await fetch("http://192.168.56.1:3000/comments") .then((response)=>{ console.log(response.json()) }) .catch((error)=>{ console.log("sorry") console.log(error) }) } …error.. Network request failed at node_moduleswhatwg-fetchdistfetch.umd.js:535:17 in setTimeout$argument_0 at node_modulesreact-nativeLibrariesCoreTimersJSTimers.js:130:14 in _callTimer at node_modulesreact-nativeLibrariesCoreTimersJSTimers.js:383:16 in callTimers at node_modulesreact-nativeLibrariesBatchedBridgeMessageQueue.js:416:4 ..

Read more

Here is my code: import useUndo from ‘use-undo’; export default function UndoTable(props){ const [hightLightCellIndex, setHightLightCellIndex] = useState(-1); let [ rosterList, undoUtil ]=useUndo(props.rosterTableData.rosterList); let activeShiftInfoList=props.rosterTableData.shiftInfoList; let calendarUtility=props.rosterTableData.calendarUtility; let monthlyCalendar=props.rosterTableData.monthlyCalendar; let contextValue={ activeShiftInfoList, calendarUtility, hightLightCellIndex, monthlyCalendar, rosterList, setHightLightCellIndex, undoUtil }; console.log(Object.keys(props.rosterTableData.rosterList["ITO1_1999-01-01"].shiftList).length); console.log(Object.keys(rosterList.present["ITO1_1999-01-01"].shiftList).length); //console.log(contextValue); return ( <table> </table> ) } I am using use-undo package to implement the ..

Read more

Tried to fix the issue in various methods and ways but it’s not fixing. I am not able to know why it’s getting an error I don’t understand the exact issue in the code. Could anyone help with the solution? Below is the pdf file format when i try to upload it’s not uploading properly ..

Read more

I want to use module.export in React and ES6 export/import in NodeJs. I want to know what’s the difference them . Why can’t I use them interchangeably I read someone’s answer that ES6 import, export is always compiled to CommonJS(require). If ES6 import is eventually converted to CommonJs, then why are we using it? Source: ..

Read more