Category "reactjs"

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

setting up lint-staged for jest

I have to try to set up a husky with lint-staged. Initially, I was trying to set up like the following but that does not work. "lint-staged": { "*.js": [

React-select & React-hook-form Controller issue

I'm trying to implement register from react-hook-forms for react-select but in order to do that I need to make use of Controller from react-hook-forms but when

Null is not an object (evaluating 'NativeMqtt.new client)

I'm using the MQTT protocol in my project, when I include the MQTT protocol with import * as Mqtt from 'react-native-native-mqtt' declare my client with const

How to manage multiple states in React? [closed]

I have components in my React App, with more than 20 rows with: useState() Is that the correct way or to assign them in a object, is there so

React-Router-dom and useHistory. Pushes new URL to history and changes URL but page does not change [duplicate]

I am to create an app which utilizes react-router-dom. I am currently trying to us eversion 5.2.0. I have tried to isolate the issue and focus