score:0
in the blog post, the call to usefetchrooms
uses the url /api/rooms
but you are using the url /rooms
. my guess is that the fetch
call is failing because /rooms
is a route in your front-end and if you switch that out for /api/rooms
it might just work (or at least get you a bit further).
const roomlist = () => {
const [state, setstate] = useglobalstate();
const fetchrooms = usefetchrooms('/rooms'); // <-----
Source: stackoverflow.com
Related Query
- React component not rendering, page shows but is blank
- React Router not rendering component at path, returns blank page with correct pathing
- react helmet not showing meta tags in view page source but shows in element on inspect
- React Component Rendering but not visible in Rails Application
- Why is my React Component Not Rendering HTML, but logs correctly?
- React router changing path but not rendering component
- React Router Dom components rendering in App.js, but not as separate component
- react-router-dom, component not rendering but only <App> shows instead
- My react onClick navigate shows URL, but does not render component
- history.push is changing url but not rendering component in react
- Page is rendering but not components although everything compiles and styles can be added outside the component
- React router this.props.history.push , pushing the location but not rendering the component
- React not rendering component into page
- Mirage JS json data is console logging but not rendering on the page in React
- The result shows in console log but not on the page when using useRef & useCallback in react
- React Component called but not rendering properly
- React conditional rendering working in one place, but not another in the same component
- React Redux - element not rendering on page but React not throwing error
- React Router - The Address Bar Is Changing But Not Rendering The Component
- React component not rendering in production build but works as expected in development build
- socket connect event inside useEffect does not work when component is created but works after refreshing the page in React
- React Routes are not working properly the URl changes but its rendering the one same page on any link i click ,
- React Component rendering but not mounting thus unable to setState
- ReactJS: My second React component is not rendering in Page
- React Router Link Not Rendering the Component but changes the URL
- React router dom not rendering child component but url changed
- Why is `Promise.then` called twice in a React component but not the console.log?
- Why IE 11 display blank page rendering react app
- Simple React component not rendering
- Why do I have to .bind(this) for methods defined in React component class, but not in regular ES6 class
More Query from same tag
- react scroll to a component without react router and with most basic code
- styled-components with grid inputs
- DeviceMotionEvent Request Permission with Typescript
- How do i use props & map function to insert image urls for cards with logos using React?
- React component doesn't update
- How to access route params from react-router-dom using Typescript? Ex: `/some-route/:slug`
- Material-UI/REACT - how to make my DatePicker work under Component instead of Function
- React onSubmit returning empty data
- Using a variable that has been defined inside render, to use it inside return
- Uncaught TypeError: auth.get is not a function
- how to remove console.log during production in reactjs created with `create-react-app`
- How can I change the width of Material UI Autocomplete popover
- Ignore other react props if one prop is true
- Passing multiple actions to mapDispatchToProps in Redux
- React pass props to children
- Context added to translation tags do not pull through correctly to extracted translations
- Adding values from inputs as new table row in ReactJS
- Using React-file-viewer
- How to filter nested object property to update a document in Express and MongoDB?
- How to make an anchor tag disable or enable after click
- Editing object inside an object in an array of objects
- How to access particular child state from parent with multiple children?
- useReducer not updating proper dispatch value
- Why my simple react component print console twice?
- reactjs calculate sum of all the value present in state in a form of array of object
- Is there a working example of React Transition Group's SwitchTransition component?
- how to combine the objective arrays have the save same key in javascript
- React functional component TypeError: Cannot read property 'props' of undefined
- Props is not defined using render props
- Change label text of react chartjs into image