Category "reactjs"

Warning: Failed prop type: Invalid prop `value` of type `number` supplied to `TextInput`, expected `string`

in react-native, I have: Warning: Failed prop type: Invalid prop `value` of type `number` supplied to `TextInput`, expected `string`. I have a postalCode an

JS Nested Ternary with Multiple conditions

Essentially I have the following issue: if condition A & B are true ->. do thing A if only condition A is true -> do thing B else -> do thing C

What is the purpose for webcomponents-sd-ce-pf.js

I am building a webcomponent based application and I am eliminating unnecessary code in my bundles. To compile es5 elements, I've added the webcomponentsjs poly

How to go to another route using <Redirect> on componentDidMount?

I'm trying to redirect user to /login if he isn't authenticated. To do so, I'm checking if the user is authenticated in componentDidMount() and if he isn't I'

MDBDataTable: how to add a button in a column when data is a json file?

I'm having the MDBTable that looks like this: //import things const DatatablePage = () => { const data = { columns: [ {

Keycloak-js 'init()' not executing in React app

When I access my app, my Keycloak config is passed to the .init() function to initialize however when I do this, the app stalls and nothing renders on the page,

Animating route transitions with CSSTransitionGroup and React-Router v6

I'm starting to use React-Router v6, and running into issues animating route transitions. Both the react-router docs and the react-transition-group docs speci

MUI5 Stepper unexpected vertical line when calling from function

Hi I am trying to develop MUI5 vertical stepper but got issue when rendering steps from function. So, there is one extra connector line on top of first step. ht

How to change background of aws amplify/cognito login/signup screen

I want to use aws amplify for an app I am making, but I can't figure out how to change the background of the login/sign up screens using withAuthenticator. Can

Why is div.scrollTop = div.scrollHeight off by one message when scrolling?

I am building a messaging app, MERN based. This is pretty straight forward, but when I apply this code to the div, the effect seems to only scroll the messages

Reset navigation history to Login screen using react navigation

I would like after Login (Welcome) the user to navigate to Home. I reset the history so the user cannot go back like this: const actionToDispatch = NavigationA

Can't run Node.js server local

I can't npm run watch I don't know the problem

How to scroll to an element?

I have a chat widget that pulls up an array of messages every time I scroll up. The problem I am facing now is the slider stays fixed at the top when messages l

How to test Material UI v5 components with sx props in @testing-library/react?

React Testing Library does not apply sx props of Material UI components during rendering. For example, I specify properties to hide an element at certain breakp

Next.js Global CSS cannot be imported from files other than your Custom <App>

My React App was working fine, using global CSS also. I ran npm i next-images, added an image, edited the next.config.js, ran npm run dev, and now I'm getting

How to create two columns with space beetwen in react native - flatList

Hi i'm new in React Native. I am trying to create two columns layout with space beetween using react native component called flatList. Here is my view Code:

environment variable not working in react firebase config file

I am making a react app with firebase and I want to use environment variables for the firebase config. this is the firebase config in my react apps src folder i

safari react-parallax-tilt bug

I have strange bug only in safari my header container have position: sticky and when I hover items wrapped in Tilt component and scroll page down this bug happe

Apollo Graphql mutation with dynamic number of email address

I have successfully created a graphql mutation that allows me to create a Staff record. mutation addNewStaff { createStaff(input: { first_name: "Test Na

Why is the response (payment Intent) after completing the payment undefined?

myReactApp/functions/index.js const functions = require("firebase-functions"); const express = require("express"); const cors = require("cors"); const stripe =