Category "reactjs"

403 when upload file to S3 bucket using axios

I'm using axios to upload an audio file to AWS s3 bucket. The workflow is: React => AWS API Gateway => Lambda. Here is the backend Lambda code where gener

ReactJS: Cannot find module './App.module.css' or its corresponding type declarations

I opened my old project today and saw these strange warnings: ERROR in src/App.tsx:13:17 TS2307: Cannot find module './App.module.css' or its corresponding type

How to validate password and confirm password in react hook form? Is there any validate property and message in react hook form to show errors?

Actually, I try to validate the form and Stucked to validate the password and confirm the password.. is there any property in useForm to validate the password a

Creating a grid with the box component and sx prop

In material UI v5 supposedly one can create almost anything with the sx prop, on the list is grid unfortunately I am unable to create what should be a simple gr

reactstrap typescript nx `Uncaught ReferenceError: global is not defined`

I'm using [email protected] with nx and typescript. But if any component is included from reactstrap the app is crashing with below error index.js:3 Uncaught Ref

Typescript Equality issue on Material UI Autocomplete

Data is stored as: { iso: "gb", label: "United Kingdom", country: "United Kingdom" }, { iso: "fr", label: "France", country: "France" } Value passed to the

Module not found: Error: Package path . is not exported from package

import firebase from 'firebase' const firebaseConfig = { apiKey: "AIzaSyBOK7x5N5UnjY4TDqndzH7l5tvdNIsWFRc", authDomain: "todo-app-e3cf0.firebaseapp.com",

How to make a class value reactive in React

I have a simple class, something like this: class ReallyHugeClass { constructor() { this.counter = 0; } increment = () => { this.counter += 1

Error with Typescript Pact.io test: PopsicleError: Unable to connect to

Expected: Running npm run pactTest should generate a pact file (JSON). Results: I get an Unable to connect error. Pact.io JavaScript implementation guide. Pa

How to call useQuery hook conditionally?

Because of the Rules of Hooks, one shouldn't call hooks conditionally. So how does one fetch data conditionally using useQuery? For example, let's say I want to

NextJS - Appending a query param to a dynamic route

In my NextJS app, I have a language selector that's visible on every page. When I select a new language, I just want to replace the current URL by appending a q

Unable to update state while using React Native

I am trying to get to grips with the React hook useState. At the moment I am unable to update the state of my errors object, a little unsure of where I am going

Filtering the Gatsby Slug in onCreateNode

I'm trying to filter the slug generated by Gatsby so I can remove white space and replace it with "-". I have Gatsby's reporter set to fire when onCreateNode is

How Do I Change Placeholder Text on Google Places Autocomplete Component in React Native?

I have been trying to find a way to change the placeholder text for a GooglePlacesAutocomplete Component in React Native. I have tried looking through the offic

What does this render method do: const {images, selectedImage} = this.state;?

I'm doing a simple tutorial on react/ redux and I do not understand why we have to, in the render() method, do const {images, selectedImage} = this.state;

How to handle React Router with Node Express routing

I am trying to manage a react app with react router and node js server my router in react: <BrowserRouter> <Switch> <PrivateRoute tok

BrowserRouter Running Error - Invalid Hook Call

Here is my code: import React from "react"; import ReactDOM from "react-dom"; import Navbar from "./components/Navbar/Navbar"; import "./App.css"; import Home f

Display alreat message if object value exist in array of object in javascript

I want to display alert message if user type name into input field and checks if the value is same as the object value present in the array of object. I'm using

React-router - How to pass data between pages in React?

I am working on a project where I have to pass data from one page to another. For example, I have data on the first page. let data = [ {id:1, name:'Ford', co

React-Native: How to open google play store from react native app?

I am trying to find a way how to open the google play store with my application when the user is pressing a button inside of the react-native application. Is th