Category "reactjs"

NPM Dependency Resolution Conflicts

When I run node install I get the following output: npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: google-map-re

Chrome extension Tailwind CSS interferes with websites I visit

I am building a chrome extension. I am using React, Typescript, TailwindCSS, custom Webpack config. I've overwritten default action in manifest.json so clicking

React HOC FC with correct Typescript type?

Another just starting out in typescript posts. I have read numerous posts on typescript HOC's and Functional Components replacing the class based components. bu

What's the reason the button isn't even clicking?

The button isnt working along with the dropdown option. Any changes I need to make? import React, { Component, Fragment } from 'react' export class MegaMenu ex

Export without Render function in React Native

In my React Native application, i am trying to add a component where i'll perform some config tasks but that component won't render anything. I have made the co

How to use MemoryRouter in order to test useParams call

I have a hypothetic React component named Component.ts with a code structure similar to that: import React, { FC } from 'react'; import { useParams } from 'rea

Render error when using swr within react component

I am currently creating a blog and I am trying to add a viewcount to my blogposts. import { useEffect } from 'react' import useSWR from 'swr' const fetcher = (

I am displaying some content using dangerouslySetInnerHtml in Reactjs for a blog page, but bullet points are not showing

I am displaying some content using dangerouslySetInnerHtml in Reactjs for a blog page, but bullet points are not showing, however the same code and page is bein

React - Cannot read properties of undefined (reading 'pathname')

I don't understand why the error appears. My task is to make animation between Routes. Can you suggest where I made a mistake? enter image description here I us

react-chartjs-2 vertical line when hovering over chart

I'm trying to create a linechart, using react-chartjs-2, that has a vertical line when hovering over the datapoints in the chart. Like in this picture below: C

React and LESS, use a dynamic value from process.env for variables

I have an app with React with LESS. I have a "mixins" LESS file like this: @STATICS: "https://should-be-set-on-env"; @STATICS_KEY: "key-should-be-set-on-env";

How can I load API before Website React Js? [closed]

When I open the site for the first time, it Loads before the API and when I Load it again, the data appears.enter image description here

recharts pie chart w/ value labels inside

using the recharts library, i'd love to create a donut chart like this: https://apexcharts.com/javascript-chart-demos/pie-charts/simple-donut/ specifically, th

Ant Design form element is not submitting when the form button is clicked

I am building a web app using Django rest framework on the backend and React on the frontend. I am also using Ant Design to help with styling. I have been follo

API takes longer to load first time opening my webpage

I have a Django app configured on AWS Lambda with zappa. In this app I created some basic APIs with DRF. On the otherside I have a ReactJS frontend that makes

window.addEventListener('load',... not firing on Safari?

I need redirect page after it load and get param from URL. I can do by button click. But I want redirect page automatic (without user input). I am use window.ad

Multiple Bottom Sheets not opening in react native Ios

Hey folks I'm using react native raw bottom sheet in react native project.I'm showing a bottom sheet when the user click on an icon.It's working fine on both an

Get the current active screen route of the tab navigator in react navigation

This is my navigation stack using react navigation v3.2.1: I have a switch navigator to switch to Authentication navigation stack and Authenticated App stack.

What is the difference between useQuery and useLazyQuery in Apollo graphQL?

I was going through the documentation of Apollo React hooks. And saw there are two queries hooks to use for which is useQuery and useLazyQuery I was reading thi

Create helper function for a (click handler) function to reuse in multiple React components

For a 'back' button I've created below (onClick) handler function in my React app. const { length: historyLength, goBack, replace } = useHistory(); const h