Category "reactjs"

How can I call Rtk Query Hook when the condition changes?

I created the endpoint with createApi: export const postsApi = createApi({ reducerPath: 'postsApi', baseQuery: fetchBaseQuery({baseUrl: 'https://jsonplaceho

Change Appbar backgroundColor in MUI

The default Appbar color is set by MUI to the primary color, which is the blue color. If I wanted to change that color directly using sx={{ background: 'white'

How to make interactive active line when clicked with react

I have 3 lists of a clickable links, so when you click one you go to that section and the line too. so this is my code : <div className="description-containe

ReactJS 17.0.2 seems to call function again when putting value into DOM

There is a strange behavior when running ReactJS 17.0.2. I have a function that generates a random number outside of a component. I assign the return value of t

Gatsby not displaying my image retrieved from GraphQL query

So, this is my problem. Im new to Gatsby and im trying to figure out whats the problem, im getting headache cause of this, cuz it seems not syntactically wrong.

Could not identify object - getting error in graphql apollo client

I'm new to graphql I'm building real time chat app. Currently I'm making it offline first. Using react as front-end. I'm currently caching the data on localStor

How to make a Post Request with XML using Axios?

I have a Network error with Axios, using the following code : const getXMLNS = (number) => { return ( '<soapen

mui select wrap text to next line

I'm using Material UI the select with checkbox, I have the following code the select component MenuItem is not wrapping the text with checkbox to next line in t

ReactJS / Axios / Django: Update form with the current image from API

I'm trying to create an update form in React, the update works fine as I have set the default values that coming from (get method) using axios and set them as t

How does chart updating works within the context of react?

I currently have a Radar chart in chart.js using the react integration. I was suprised to note that, when I updated the data, instead of showing a completely ne

How to use class component without extending React.Component

I have been given in built ui kit which has class based component without extending React.Component. Now i need to use those UI components for building UserInte

Can one implement an update system like the CoinMarketCap app in Ionic

I'm currently building an Ionic app which will be getting very frequent updates. If possible, I want to avoid sending users to the app/play store each time I pu

cant access state, react redux

I have a page with notes for a specific user, the problem is when i'm trying to access the state of 'my notes' i get 'undefined' on console, in postman, everyth

Storybook install with react

I tried running npm run storybook after installing it for the first time on my new create-react-app application and I am getting this error. Anybody know how to

How to use redux in Next.js?

I am new to Next.js, So I follow some tutorials for Redux integration in Next.js. All is working fine but whenever I switch between pages, each time API make a

Vercel causes 500: Internal Server Error (works on localhost)

I'm creating a page where I can get an overview of all my notes/summaries. The note's pages are markdown files converted into HTML used in a dynamic file. The '

Webpack: Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object

I want to create custom component and build with webpack // packages/button/src/index.js import React from 'react'; function Button({ href }) { return <a

Critical dependency: the request of a dependency is an expression while using lazy loading

I am trying to dynamically import modules but getting following error - Compiled with problems:X WARNING in ./src/.../useCustomModule.js 21:21-56 Critical depen

How to re-render a heavy React component with a low priority?

With some parameters, I have a React component that can take a few seconds to render but it is not a problem at all if it is not up-to-date. To prevent the UI f

How to add header in exported CSV file in react-bootstrap-table

I would like to add a couple lines as header on top of the exported CSV file in react-bootstrap-table Like this one: I've gone through the docs but still no id