Category "reactjs"

CSS animation/keyframe speeds are different when looking at the site locally and on a code sandbox?

I have the exact same code on my local machine as I do on StackBlitz (an online Next.JS sandbox-type website), and for some reason - the animation speed for the

marker is showing out of the map in mapboxgl react project

I am using mapboxgl for the first time. i found the source code from github. the map is working fine but the marker is showing outside of the map. don't underst

Is there a default function I could use for comparisons with React.memo?

I have a <Track/> component that have an object as prop; like const myData = { "location" : ["http://example.com/1.ogg", "http://example.com/2.mp3

auth.currentUser shows undefined on HomePage

I have a file where I have written all the firebase related functions, including this one here function CurrentUser(){ console.log("auth", auth) return auth.cur

Adding a logo in printed page (pdf) not in actual page using react-to-print

I'm trying to add a logo on top of the printed page not in the page that browser or device renders. I'm using react-to-print to print page in PDF format.

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