Category "reactjs"

Is the parent object reference changed if a child object is changed?

Suppose I have this let a = { data: 'old' } Lets say hypothetically that a has a reference to '123' If I do a.data = 'new' Is the reference of a still pointin

React(Typescript) onchange event type

In My React Component I have Radio input <input type="radio" onChange={changeData}> and function changeData(e: any) {} How can I speci

How to check if the fields exist in a document

I have a user collection and I'm trying to search if the first and last name exists and if not, I just want to put a display message that it does not exist. I t

Custom onChange for React Hook Form and watch()

I am trying to write a custom onChange and watch the change. Error: The watched myValue does not register the changes in the dropdown. Any ideas why? According

How do i use localstorage in React native?

I have a web app that I want to convert to an native app with react native. So I started the project and all the logic is the same as the web-app but i don't kn

Apply motion to react component Framer-Motion

I know that I can apply motion directly to element/HTMLtag like this: <motion.div>some content</div> But how can I apply it to this? <Comp />

How can I get the all html code into view page source as I am developing a project in NEXT.js

I am developing a project where i am using NEXT.js but there i am getting a issue like i am not getting the all html value in view page source. I think my probl

How to upload multiple files in different folders using Reactjs and Laravel

I want to let users of my website upload multiple files that could be in different folders. Using 'multiple' attribute in file input control doesn't let you sel

How to deploy React client and Node server (Both in a single git repository) in Heroku?

Am having a single Git repository where it contains both client and server. This is my Webpack.config.js const path = require("path"); module.exports = { d

Convert blob to pdf file

Using react-pdf's BlobProvider, I'm trying to store the file to state. Here's what I tried: MyDocument = () => { return ( <Document&g

docker bind mount not working in react app

I am using docker toolbox on windows home and having trouble figuring out how to get bind mount working in my frontend app. I want changes to be reflected upon

React JS - Reset Form Data after Modal Close

I'm trying to reset my form data when a modal closes. I think part of my problem is that the form data <Mint> is in another component. Honestly, any time

Modal should appear whn user navigates away from notes without saving it - react.js

I've a custom notes and Save notes button as shown in below screen shot: If the user navigates away from notes tab without saving the notes, a confirmation moda

[TypeError: (0 , react_router_dom_1.useParams) is not a function]

I have a component which uses react-router-dom's useParams hook to get params. It is used in my component as : /// Child.tsx const Child = () => { const

Display a YAML file in the UI using reactjs?

I want to display a YAML file in the UI of my component using Reactjs. const ymlText = YAML.stringify({ json1 }); ymlTxt is my YAML file, I want i

Is there a way to get npx to create a React app on my computer?

I am totally new to React and Node.js although I have written software in a variety of languages and have created web applications using Cold Fusion. I am using

How to fix my old react project not working as expected?

I'm new to react and have just added some regex validation to a jsx file in an existing react project (created about 4 months ago) . After building a new bundle

How do I have different Hero (background) on different pages

I have different CSS for every page. I already tried some tutorials, but that one Hero does not want to disappear. How do I remove that one Hero? Using React v.

FCM - web Token getting generated in my account but if i am login with some other Gmail account in chrome then it will throws Error

Other than my registered Gmail account I will be getting the below error in the chrome browser perhaps token getting generated if I log in with my email id in c

Imports not importing using Jest and Typescript

I am using Jest, Enzyme and Typescript, but for some reason certain imports are not working... they are undefined. For example, I have import ReactMarkdown from