All Questions
Tagged with sanity react-native
23
questions
9
votes
2
answers
6k
views
Getting the "URLSearchParams.set is not implemented" error when trying to fetch data from my sanity backend using React Native
I am getting an error in my to react native project when pulling data from my sanity backend
this is the error
URLSearchParams.set is not implemented
This is where I am fetching he data
import {...
8
votes
4
answers
5k
views
The following files share their name; please adjust your hasteImpl: * <rootDir>\package.json * <rootDir>\sanity\package.json
This is my first time using sanity and I have encounter with this problem, When running expo start , I will be very thankful if you can help me with this
jest-haste-map: Haste module naming collision: ...
4
votes
1
answer
3k
views
WARN The default export of @sanity/client has been deprecated. Use the named export `createClient` instead
I'm currently learning React-Native. I try to use sanity in my project.
This is my sanity.js page. I could not get why sanityClient is strike-through.
I also get this error " WARN The default ...
3
votes
1
answer
640
views
Error: Duplicated files or mocks. ReactNative-Expo-sanity.io
so have been developing a react native app using Expo and sanity.io as back-end, when I implemented sanity as backend i started getting an error just on the mobile versions(ios simulator, and andorid ...
1
vote
1
answer
141
views
Node.js not finding the default system root
I was trying to configure sanityCMS on my machine and node.js decided to "forget" the system root. I spent a couple hours trying to fix it and since it decided not to, I went back to my expo ...
1
vote
0
answers
84
views
React Natice Expo with Sanity receive TypeError: undefined is not an object (evaluating '_sanity.default.fetch') error
TypeError: undefined is not an object (evaluating '_sanity.default.fetch')
sanity.js file
import client from '@sanity/client';
import imageUrlBuilder from '@sanity/image-url';
export const ...
1
vote
1
answer
281
views
Having an issue pulling data from my sanity.io database in react native app. I can pull it in one section but not another
I am having an issue with this code for a bit now. I think the problem is in my useEffect hook with the "{ id: '' }". When I console.log this data from my sanity.io client, the data comes up ...
1
vote
0
answers
93
views
Duplicated files or mocks when trying to use Expo Go App
Thank you for taking up sometimes to read this article and trying to help me to solve this problem.
I have this problem over and over and over for the last 14 days every time I try to open a project ...
0
votes
1
answer
3k
views
How to post data to sanity cms
Hi I want to POST more data on my sanity project database. To add data to the server like we do in the sanity studio
How can I do that?
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 ...
0
votes
1
answer
580
views
Uploading image to sanity io in react native
I have a array of objects in sanity io and each object is like this:
{
name: "savedFaces",
title: "Saved Faces",
type: "array",
of: [
{
...
0
votes
1
answer
938
views
How to change the value of a sanity field
So i want to change the value of a specific field called "likes"
Here is the schema:
//...
fields: [
{
name: "likes",
title: "Likes",
...
0
votes
1
answer
502
views
I have an error every time i run my react native code on my Simulator but it works on the web
I am creating an application, on react native and i am using sanity cms as my back-end. Once i installed all the packages for sanity there was a package.json that was installed, and in my project once ...
0
votes
2
answers
530
views
Sanity.io TypeError: undefined is not a function React Native Expo
I am trying to create a client with sanity.io and I keep getting the error - TypeError: undefined is not a function. I am following this YouTube video (https://www.youtube.com/watch?v=AkEnidfZnCU&...
0
votes
1
answer
783
views
How to connect my Login(made using React) with my Sanity.io?
I've been trying to improve my React skills by following some JavaScript Mastery tutorials, but it happened that one of them is out of date. In the tutorial, he uses the old Google Login, which I ...
0
votes
1
answer
386
views
Error when inserting a value to an array in Sanity.io
So I'm using sanity .patch() to insert data inside an array.
But I'm continously getting this error:
Error: insert(at, selector, items) takes an "at"-argument which is one of: "before&...
0
votes
1
answer
773
views
Sanity documents not showing
Whenever i create a new document in sanity using 'createOrReplace'. It successfully creates the document, but however it doesn't show the newly created document in the home screen.
Note: All the other ...
0
votes
0
answers
24
views
Sanity GROQ Query Not Working in React Native App
I am building a react native project using react native expo and sanity cms. I have done the proper set up of sanity cms and also its schema. I have added the data in the localhost:333 server of ...
0
votes
0
answers
24
views
Sanity real-time update is not working on Expo
I'm tring to listen documents in sanity but getting this error
TypeError: Cannot read property '_nativeModule' of undefined, js engine: hermes
this is the part of my code that causing the error
const ...
0
votes
2
answers
42
views
Sanity.io fetch function running infinitely
import { View } from "react-native";
import React, { useState, useEffect } from "react";
import Memory from "../component/Memory";
import sanityclient from "../...
-1
votes
1
answer
1k
views
How to connect Sanity to React Native
I have been trying for ages to make Sanity work with React Native and It's not working out, read multiple documentations, followed many tutorials but no luck.... What am i doing wrong?
Made a simple ...
-1
votes
1
answer
223
views
I'm getting this error using React Native and Sanity: Unable to resolve "get-random-values-esm" from "sanity\node_modules\sanity\lib\index.js"
I'm using sanity and react-native with expo to create an app. but on the mobile devices I get the error using expo go.
i've tried deleting node_modules folder, and re-intstalling the node_models, i'...
-1
votes
0
answers
494
views
React Native and Sanity Fetch Request Problems/Mistake?
I am trying to fetch data from a Sanity Database HTML link but eveything i try it does not work...
I am trying not to use the sanity client but just the link itself (Http:....)
import React, { ...