Category "reactjs"

How to create custom CSS classes using MUI v5 theme?

I am using MUI v5 in my application along with react-d3-tree which renders SVG tree charts. It offers an API to include custom CSS class names in the <path&g

I can't install npm install --save react-tilt

C:\Users\JohnSam\Desktop\React\smartapp>npm install --save react-tilt npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm

How to use react-dropzone with react-hook-form?

How to use react-dropzone with react-hook-form so that the form returns proper file - not just file name?

npm ERR_SOCKET_TIMEOUT error while installing create-react-app

While attempting to install create-react-app I'm getting the below ERR_SOCKET_TIMEOUT error. Creating a new React app in E:\New folder\my-app. Installing packa

Typescript useState: SetState in Child with argument

thx for any help. How can I pass down setState to a child component and use the c argument without a typescript error? Parent: Passing down setState export inte

How to use react-router-dom v6 navigate in class component

I installed react-router-dom v6 and I want to use a class based component, in previous version of react-router-dom v5 this.props.history() worked for redirect p

React scroll with antd tabs (scrollIntoView) working for some tabs only

I'm building a multi tab chat like UI using react and antd, it looks like image below. On the left side you can see multiple tabs showing last names using antd

Access context outside render tree

I have an app in React Native that uses many context. I want to access one of them within a non rendering function e.g. : const DataContext = React.createContex

Teams UI Toolkit - Toolbar, Gauge and Map not found in @fluentui/react-teams

I'm developing a dashboard that will be embed in a Microsoft Teams Tab. Microsoft provides an UI toolkit: package and figma templates (source article). However,

React Background Image Change Animation

I'm working on a weather app with ReactJS, what i'm trying to do is have a slideshow of images for my background, the images will be full screen, fading from on

React Electron App - React Leaftlet Content Security Policy errors

I am currently creating an Electron app in which I would like to use react leaflet's maps functionality. This requires the use of external url's which throws CS

Next.js 12 ( with react ): Cannot read env variables, process.env is undefined

I'm using next.js 12 with a react app. I have the following .env.local file: NEXT_PUBLIC_DEVELOPMENT_ENV_VARIABLE="public_development_variable" I start the dev

I am not able to run yarn export command even I have updated my packages.json file - A next.js related question

PS C:\Users\sujee\Desktop\Next App\panda> yarn export yarn run v1.22.18 $ next build && next export info - Checking validity of types Failed to com

How to change the font size of the bullets of an unordered list item in draftjs?

I have a rich text editor built using draftjs. I implemented the functions for changing the font size, font family, and color of the text in the editor. I also

How to get index of row in ant design table?

I want to show index of rows in ant design table. eg: 1 to 10 for 10 rows data i got. const columns = [{ title: 'ID', dataIndex: 'id', key: 'id',

React Typescript: It looks like you're trying to use TypeScript but do not have typescript installed

I want to create a React application and I want to use a typescript in this application, at first I went to the React website in order to create an application

How to modify a React Router Location?

I'm using the useQueryParams library, which takes a RouteAdapter, which is forwarded a Location, which can be sent to React Router to trigger a navigation. I wa

Problem Upgrading React application - material UI v4 to v5

I have this problem upgrading my react application. Basically, I followed the damn mui-v5 documentation, and I still have some erros in my app.tsx file. import

getTokenIdMetadata function in Moralis is not showing anything on HTML card MUI. How do I fix it?

I am trying to use getTokenIdMetadata from Moralis to get detailed information about an NFT. So far, I am able to get the data as you can see below in the json

IntelliJ reporting typescript error for react-bootstrap-table-next

I'm using react-bootstrap-table-next (aka react-bootstrap-table2). I'm getting a Typescript error in IntelliJ on the validator field in my column definition. I