All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
51 views

how to get a portion of useState stored data in another useState

In the project that I am working on currently I am fetching data from sanity and storing that data in a useState(), and that data is a collection of multiple restaurants, each restaurant has different ...
Abdellah Slimani's user avatar
1 vote
1 answer
419 views

React update state of component after search through object

I have an object that is outputted from the reactIcons npm package https://www.npmjs.com/package/react-icons I am importing everything from one of the folders with import * as ReactIcons from 'react-...
Anders Kitson's user avatar
1 vote
1 answer
66 views

React button not rerendering the component

I am making a blog with React and Sanity, and am trying to use buttons to allow the user to sort blog posts by tag (category). Currently, the sorting works fine if I hard code the tag I want to sort ...
Brandon Pyle's user avatar
1 vote
1 answer
588 views

React: Element type is invalid: expected a string (for built-in components)

I am building a blog with React and Sanity everything so far went pretty good but now when i am trying to add SinglePost pages for each blog the code was fine but when i went to a post and clicked i ...
Developer dayan's user avatar
0 votes
1 answer
69 views

Unable to update the state in useState Hook

This is my code. I'm using sanity for content management and developing react native app. Here the API call is returning correct value however setdata is not updating the state services. So when I try ...
Manoj Bhat's user avatar
0 votes
1 answer
1k views

nextjs sanity TypeError: Cannot destructure property 'params' of 'param' as it is undefined. when using 'use client' directive on server component

I am new to Next.js, and I'm building an e-commerce site using Next.js and Sanity. I have a getProducts function that fetches product details from Sanity. In the ProductPage,I import the getProducts ...
Antony Ponson's user avatar
0 votes
0 answers
39 views

User-profile undefined only in the navbar and pin section of the React sanity app

I’m trying to get the user's Google name and profile photo into my React app (with sanity as backend), but it only works in the home and sidebar section of the app, but not in the navbar and pin ...
Jefferson Chidiox's user avatar
0 votes
0 answers
78 views

Having issue fetching comment from sanity.io across all pages in Next Js

I have collections of comments from sanity.io, am trying to fetch the comments to make them available on all pages. I tried fetching it in the _app.tsx using getServerProps but am receiving undefined. ...
Rengkat's user avatar
  • 41
0 votes
1 answer
990 views

NextJS Dynamic Loading of Components

I am using Sanity.io as a storage system, and I want to dynamically load components based on the content type. In the builder, each content element is assigned a "_type" value (such as "...
Ourelius's user avatar