Category "reactjs"

How can I put border styling with react-stripe-elements input component?

About this React component library. https://github.com/stripe/react-stripe-elements How can I put border styling with input component? <CardElement style={

React google login silently failing

const onGoogleLoginFailure = () => { console.log("failed"); }; const onGoogleLoginSuccess = useCallback((response) => { const idToken = re

API undefined issue with petfinder and ReactJS

I am having an issue with petfinder API and ReactJS. Everything works until I try to access the pets "object/array". import React, { Component } from 'react'; i

Does Material UI have an Image component?

I used other react components before, they mostly have their own Image component, but I can't find that in Material-UI? Or is it done via CardMediaAPI? or simp

How to get the width of a react element

Im trying to create a range input that displays a tooltip right above the slider thumb. I went through some vanilla JS examples online and it seems that I need

What does this warning message mean? 'img elements must have an alt prop, either with meaningful text, or an empty string for decorative images'

Why am I getting this warning? warning: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/im

Convert blob to image in React Native?

I have a blob in aws S3: https://s3.us-east-2.amazonaws.com/fakedomain.com/2021-12-23T21%14%05.888Z-blob I'm trying to display it within the card <Card.Cover

Access to fetch at from origin 'http://localhost:3000' has been blocked by CORS policy

Adding to the database shows the error. what should I do? Access to fetch at 'http:xxx' from origin 'http://localhost:3000' has been blocked by CORS policy: Re

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