Category "reactjs"

How to merge cell in react-table

I am using react-table and want to merge cell of specific cells based on their number inside. It likes remove divider border. it looks like this: https://i.img

Different function gets passed to useEffect on every render? - ReactJS useEffect

I was going through useEffect from reactjs docs and I've found this statement here Experienced JavaScript developers might notice that the function passed to u

How do I persist my theme to localStorage in NextJs?

I have my theme stored in a stateful function that defaults to false. I then passed a onclick function to toggle between false and true. I want that stored in l

JSX Text Input doesn't work if it has an onChange property (React)

I'm having an issue where any text input that has an onChange property will not let me type in it. I still do have a milisecond of time that I can type somethin

Vercel Failed to compile. React

first, I was getting the same error for react-icons. now I am getting errors for the typewriter. it works fine on localhost. when I'm trying to npm i typewriter

how to get data from graphql server using react and react-apollo?

After about 6-8 hours trying, I'm resorting to help. All I want is to query my graphql server and the response data to be entered into my react component as pro

How to set initial state for useState Hook in jest and enzyme?

Currently Im using functional component with react hooks. But I'm unable to test the useState hook completely. Consider a scenario like, in useEffect hook I'm d

Type {} is missing the following properties from type {}: length, pop, push, concat, and 29 more

const function= () => { facets = useSearchMoreFacets( variables ); }; type UseSearchMoreFacets = { facets: MappedFacet[] | undefined; };

How to create in Recharts a custom vertical label for the YAxis that will scale to fit in case the label is too long?

I am building few composed charts using the Recharts library and some of the vertical labels on the YAxis are too long and are getting cut off. A picture of m

React component type in TypeScript

What is the correct way to describe the type of a react component in TypeScript? Say we have a function which returns a react component. The function: const ge

Creating a (.NET 6 based) website project with ASP.NET Core and React (TypeScript) in Visual Studio 2022?

I have been trying to set up an ASP.NET Core + React (TypeScript) web app project in Visual Studio 2022, but couldn't succeed in doing so. There are no proper s

The engine “node” is incompatible with this module when installing React-chartjs-2 Chart.js,

I am creating a doughnut chart by using chart.js with its react wrapper. It's working fine in the new project, but not able to install it in the main project. B

React Native + Expo + Axios file upload not working because axios is not sending the form data to the server

I am trying to upload an image with react native front end and axios to my back end. This is how pic the image const pickImage = async () => { let result

React not rendering an mdxjs file

I am trying to create an addon for storybook that adds a tab to the top of the page, I have it working except that I cannot get it to render an MDX file in the

Change input value with useRef

I captured an element with the useRef hook of React. if I use console.log(this.inputRef) I get: <input aria-invalid="false" autocomplete="off" class="Mui

Apply CSS Module class name by directly accessing the DOM

I have a component that makes use of CSS-Modules, by means of the babel-plugin-react-css-modules plugin. At some points during the lifetime of the component I

react-native cannot find android studio

It's usual that react-native cannot find android SDK. My problem is different... Android ✓ JDK ✖ Android Studio - Required for building and inst

Manually closing the calendar primereact

I'm using primereact version 6.2.1, While using the calendar from primereact i have enabled the option for showTime. This brings up a datePicker with an overlay

Create dynamic svg icons component in ReactJs

I want to create a React component for my SVG icons but if I use this component several times (with different props) in another component, it always renders the

How can I get information on hover effect in atom editor as it displays in VScode?

Is there any plugin that I have to install in Atom to get this type of information on hovering on variables, objects or functions somewhat like intellisense? It