Category "reactjs"

How do I change slate editor value using Javascript (DOM manipulation)

I want to change the text in the slate editor using DOM manipulation via Javascript. Dynamically change the values filled into editable components in a particul

What's hydrate action in Next Redux Wrapper?

Recently I started using Next.js and I have a question about the next-redux-wrapper package. I don't really understand the HYDRATE action. So I wonder concretel

react-router-dom router change the url but nothing else. All of components are not changed

I can't solve why it doesn't work. When I clck on the link new page the url is changing but the page not (it should change to new page with div witch some conte

How do I persist auth between react and a flask server

I created a flask server and added the following endpoints to this server: @auth_routes.route('/login', methods=['POST']) def log_in(): log_in_data = reques

Unexpected token '.' when run create-react-app

I am trying to create a new React app using this command on Windows using Node 16.14 npx create-react-app my-app But it fails with this error npm ERR! Unexpecte

How to create fixed scrolling in Locomotive Scroll in Next.js

I'm currently using Locomotive Scroll with NextJS to implement smooth scrolling. The web app that I'm currently developing with NextJS requires a fixed scrollin

How to make useEffect listening to any change in localStorage?

I am trying to have my React app getting the todos array of objects from the localStorage and give it to setTodos. To do that I need to have a useEffect that li

Testing function that use useQuery @apollo/client with Jest

I am trying to unit test my function that call useQuery from @apollo/client. Here's what I have done getPixelID.ts import { useQuery } from '@apollo/client'; im

How to use Amplify for implicit federated oauth w/ cognito *without* hosted UI

(Due to the confusion with what is amplify I'm borrowing the below from another post) I want to use the feature federation of a user pool NOT an identity pool I

Issues Running react project, SEVERAL module not found errors

so I'm trying to run this one react project (one that I've run SEVERAL times & has worked SEVERAL TIMES before), but for some reason, it just doesn't work a

Text input field won't submit when pressing enter

I have a text input that I am trying to use to create new tags via hooks. However, when I enter in the value and press enter, nothing happens. I Googled it and

Paste from clipboard not working with React Native on iOS simulator

As the title says, I'm working on an app that has an input text and when I tried pasting text I had on the clipboard, it wouldn't do anything, but it shows the

Nextjs: Cant render a component while using map over a array of objects. Objects are not valid as a React child

I dont know why when i want to render a component inside of a map function, basiclly i have a List component, and when i fetch data from an API with the email,

post request using crud crud in react js

Trying post request in crud crud dynamically using fetch api but its showing error net::ERR_ABORTED 415 (Unsupported Media Type) const addItemToCartHandler = as

How to pass a function from Parent to an element within a route in React.js?

I want to pass a function to a component through a Route , I can do it with direct children but when it comes to Routes i can't figure it how to do it. look at

What Causes 400 Bad Request In Django Graphene and NextJs Using The useMutation Hook?

I am trying to build a simple todo app using Django, Graphene and NextJs. I was able to create todos in graphiQL and postman, however when I try to create a tod

next-images Error: Module parse failed: Unexpected character '�'

I'm trying to load an image with next-images: when i type in the image name it works fine: //Working <Image src={require(`../../images/exampleImage.jpg` )}/&

Problem with styled-components running React 18 and Next.js. Module not found: Can't resolve 'process'

I have to use React 18 for Suspense in a three.js/next/ts project (I have tried using next/dynamic and it does not work). So I installed it and updated everythi

Apollo Client useMutation data always returns undefined

I have the following code that runs a mutation to update a post to "published" the mutation works great! It updates the data as expected. However, the data prop

No feedback after pressing React native onPress

I have a button component with a simple onPress const Press = () => { return ( <Button onPress={() => { Alert.