Category "reactjs"

How to jump to a timestamp in a YouTube iFrame in React?

I'm trying to make a button that jumps to a specific time in an iFrame of a YouTube post, but I'm getting the error "TypeError document.getElementsById is not a

How can I change the width of Material UI Autocomplete popover

When using the Select from Material-UI, there's a prop there called 'autoWidth' which sets the width of the popover to match the width of the items inside the m

Warning: validateDOMNesting(...): <a> cannot appear as a descendant of <a>

I'm trying to use react-router with reactstrap in a create-reat-app .In the routing page i needed to use state for the reactstrap so i converted the router from

How to disable labels for additional properties with react-jsonschema-form?

I am trying to use this playground to find a schema which will allow me to show an object addable custom properties (basically I want the user to enter an assoc

Custom Style to a form created using react-json schema form

I am trying to create a form using react-json schema-form. I am new to the custom templates for the same. I would like to have all the widgets in the form in a

Deprication Warning !! After running npm start on client side project. The following error has shown. It was working before the computer shut down

npm run start [email protected] start react-scripts start (node:13940) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSet

Deep Linking with react-navigation does not work

Actually, I'm developing an app on react-native 0.58 with react-navigation 3.1.5, and I can't make my app run properly. This is my code: app-navigation.js co

Deep Linking with react-navigation does not work

Actually, I'm developing an app on react-native 0.58 with react-navigation 3.1.5, and I can't make my app run properly. This is my code: app-navigation.js co

How to base64 encode inputs in React?

I am trying to post two inputs with axios and I want to base64 encode them before I send them.

How to export Axios.create in Typescript

I have this working: export default axios.create({ baseURL: 'sample', headers: { 'Content-Type': 'application/json', }, transformRequest: [ (dat

How to make 301 redirect in NextJS Vercel project?

How can I make 301 re directions from one url to another in NextJS application that is stored on Vercel? I tried to add custom express server using server.js fi

Copy to clipboard using ReactJS

I am calling an API to fetch the data of an object. The object properties are as follows: obj:{ name: "item", index:1, amount :20, } What I want is t

why componentdidmount called two times

I have React Component in componentDidMount fetch data from the server. The issue is componentDidMount called twice also the API called twice. I have a view inc

How to use ChakraUI extended fonts

Hello I have question can I have 2 different fonts for Heading like you know you define <Heading fontFamily={???}></Heading> and set font family ins

jest.config is being ignored

I have the following in my jest.config.js module.exports = { preset: 'ts-jest/presets/js-with-ts', testEnvironment: 'jsdom' }; but it's being ignored w

React + Typescript - Refs typing errors

I have seen many other questions with the same problem as mine, and I have tried all solutions, but it is not working. I have a form with many inputs, which I h

Should I wrap every prop with useCallback or useMemo, when to use this hooks?

With react hooks now available should I in case of functional components wrap every function passed with props with useCallback and every other props value with

Nextjs shallow routing for tabs?

Have a tabs component which work perfectly with the router.query state useEffect(() => { let found = false; if (currentTab !== 'leads') {

React and Tailwind CSS: dynamically generated classes are not being applied

I'm just learning React and Tailwind CSS and had a strange experience with CSS grid using Tailwind classes. I've made the buttons for a calculator, with the las

How to overlay content on react leaflet (z-index problem)

Really tried to not post this as I've seen similar questions but I'm not able to display anything over the react leaflet library after reading things online. T