Category "reactjs"

How to set focus a ref using React-Hook-Form

How do you implement set focus in an input using React-Hook-Form, this is what their FAQ's "How to share ref usage" code here https://www.react-hook-form.com/fa

Concat string with html element in react

This might give a better idea, replace in paragraph, ' ==> " and highlight it for (let i=0; i<orgString.length;i++) { changeVal.push("color:#" + Mat

How to query for image height and width in Gatsby.js?

I want to conditionally render sections of a page, depending on the height and width of the images that go in each section. I source the images from the Content

How to dynamically disable a row's checkbox in react-bootstrap-table2?

I want to achieve something that is in my current sandbox: Currently I've hardcoded the nonSelectable: [1, 2] so it will make row 1 and 2 unselectable. Now I w

Is there a way to make an api call within a map of another api call?

I know the title is quite confusing, I wasn't sure how to word it better. What I am trying to do is to fetch some items, map through those items to display them

MaterialUI - 'StylesProvider' cannot be used as a JSX component

I have an app written in React with TypeScript and lately after refreshing node modules and the lockfile I am getting this error when trying to run the app: Typ

How can I upgrade ansi-html from 0.0.7 to 0.0.8?

I have a maven application which uses ReactJS for the front-end and it is using ansi-html:0.0.7 currently. This led to vulnerability alert by GitHub dependabot

White blank page when I deploy my (React.js & Django) app to Heroku

I'm beginner and the project works perfectly locally , but when I deploy on Heroku I get a blank page. I also connected my Heroku to GitHub and and I made a bui

I imported jsx files but can't use/ import it in ReactJS [closed]

I use these 2 classes : auth.js import React from 'react'; import log from './../components/log/'; const auth = () => { return (

How to disable popover when hovered over another card in react js

I'm trying to build course cards in which when hovered to any course card a popover should appear and popover is visible till when i hover on card and popover i

Redux-persist does not work with Redux-Toolkit

The app works fine The only thing is that redux persist is not working as it should.Persist doest not persist anything,it does not give any errors in the consol

What is the difference in localhost:8000 and http://127.0.0.1:8000?

I am running a Django project with react redux (trying to implement authentication system) and the very weird thing i observed that my site is rendering properl

Link tag not triggering onSubmit when clicking on the form's submit button

For some reason when I wrap my Link tag around my form's submit button it doesn't trigger the onSubmit() function. What am I doing wrong? import { Link } fr

How to remove HTML tag (not a specific tag ) with content from a string in javascript

Is there any way to strip HMTL tag with content in HTML example : const regexForStripHTML = /(<([^>]+)>)/gi const text = "OCEP <sup>&reg;&l

How to control address bar change and back and forth actions in browser?

Have a nice day, everyone! I have a problem. I have an application written in React/TypeScript using Redux and react router . There is a table in which the user

React native - highlight an icon in a "fizzy" way

enter image description here Does anyone know how to achieve this effect?

(node:9374) Warning: To load an ES module, set "type": "module"

I just started to learn React today. How do I get rid of that error message on my Console in the Terminal in Visual Studio. (node: 9374)Warning: To load an ES m

Adding serial number to the react bootstrap table

I am using a React-bootstrap table in my project, I want to add a column in my table with a serial number but am unable to generate the serial number so kindly

React: The best way to pass html attributes as props

For instance, I want to behave a Button as a normal button and enhance the component. <Button type="submit" className="btn">Click me!</Button> lead

TypeError: func.apply is not a function

I'm trying to use useEffect function like that: const [data, setData] = useState({ courses: [] }); useEffect(async () => { const result