Category "reactjs"

React - get data with axios

In my react app that is based on class components, My response API got from open weather fixes after several lags. this is my state class Weather extends Compon

How to change default sorting icon on table header column on React Material-Table?

Can I change the default sorting icon on React Material-Table table header column ? ex. I want to change asc sorting icon to ArrowDownward and desc sorting icon

How to change default sorting icon on table header column on React Material-Table?

Can I change the default sorting icon on React Material-Table table header column ? ex. I want to change asc sorting icon to ArrowDownward and desc sorting icon

Material UI / React - close accordion onSubmit

I have a form within an accordion - what I want to do is when the form is submitted collapse the accordion. <Accordion elevation={3}> <AccordionSummary

Material UI / React - close accordion onSubmit

I have a form within an accordion - what I want to do is when the form is submitted collapse the accordion. <Accordion elevation={3}> <AccordionSummary

Validating array of different object shapes in yup

I am using formik for form validation and came across some problems in array validation. here is my form structure { flow: [ { text: "hello" }, { input:

Redirects doesn't work on netlify with nextjs

I simply followed the doc by adding this to my next.config.js module.exports = { reactStrictMode: true, async redirects() { return [ { so

Jest messageParent can only be used inside a worker

Is there a way to get a proper error message? when i do $npm test and I intentionally break my code(cough cough remove a line of code) I get this message src/re

React: add HTML from generic file path at server-side build time

The use case I'm trying to fulfill: Admin adds SVG along with new content in CMS, specifying in the CMS which svg goes with which content CMS commits change to

How to reach the data from Redux devtool?

I want to reach the data of 'audience' under an endpoint where it shows in Redux dev tool of Google Chrome. Is it possible to reach it like we reach the localSt

useParams() unable to fetch path dynamically react-router v6

My code is unable to render the elements of the nested route component present in my QuoteDetail code block while I'm using the dynamic path value import { Rout

React Native line-through not centered

The strike through is not vertically centered. My code is like this: <Text style={{textDecorationLine: 'line-through', alignSelf: 'center', fontFamily: const

Page is not rendering after using `history.push` in Ionic/React with `IonTabs` as nested routes

I have an Ionic/React v5.0.7 app with IonReactRouter to manage routing: // App.tsx return ( <IonApp> <IonReactRouter history={history}>

auth is not a function

I'm trying to do a simple login form, and Firebase auth give me this error TypeError: firebase__WEBPACK_IMPORTED_MODULE_1_["default"].auth is not a function. (

How to make reactstrap modal draggable?

how to make reactstrap modal draggable? I have tried by using react-draggable plugin but it is not working properly. It is work only inner section of whole moda

How to pass dynamic query name to GraphQL?

Is it possible pass query name to GraphQL using props in React? const allEntries = gql` query allProducts{ '${queryName}' { id name

filter search bar not showing up

I'm trying to create a filtering search bar to sort through a limited set of data pulled from an API. The code compiled successfully, however despite having an

Using makeStyles in material ui with typescript

I'm trying to convert JavaScript template to Typescript. So I have this accordionStyle.ts like below import { primaryColor, grayColor } from "../../material

how to test button that call submit form using jest and react testing library

so I am trying to test that the onSubmit function is getting triggered if the button is clicked - the way im doing this is through testing the internals of the

MaterialUI makeStyles undoes custom css upon refresh in NextJS

I am working on a NextJS site that has some custom styling that is being applied via MaterialUI's makeStyles. It works fine on the first load and then undoes al