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 ..
Category : reactjs
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 ..
I had to do something similar to this before (displaying items in a grid) so I tried to follow that pattern. I have stared at this for a while trying to figure out what is wrong. Is there something I’m not seeing? Help Error message 9 | console.log(localStorage.getItem("shoppingCart")), 10 | <div> 11 | <Grid container ..

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 ..
In NextJs application, I want to add <script> code but not getting where to add and how? I tried by adding it in .js file but didn’t recognise. In react, we have index.html to add these things, what about in Nextjs app? Source: Ask Javascript..
I have a list of items where the user able to select one item at a time, For example, if a user selects one row then I want to disabled other rows I want to be select one row at a time . I really tried hard but didn’t able to resolve this issue. Code ..
While learning redux I have come to a standstill when trying to fire an action. I am able to console log action.payload successfully, as well as {data} in the action so I suspect maybe it has something to do with local storage(?) but I really can’t see what’s wrong. I am able to access everything ..
Hi I am new to redux and authentication. I am creating a react/redux app where a user can login and be able to add a story by submitting a form. I am able to login but when I get to the story creation page, I click submit and I get a POST http://localhost:3000/api/v1/stories 401 (Unauthorized) ..
I want to sort in the order in which there are many matches between the cookup content and the ingredient in the FlatList. My final goal is to list the items in the Card component in the order of the number of matches of content and ingredient. Cookup and ingredient range from 1 to 10, ..
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: ..
Recent Comments