Category "reactjs"

Why "he" does not write React.FC on each function?

I learn typescript, and I dont understand why he write in the first Function React.FC and in other function he does not write "React.FC". Why? exp: ... const Lo

Rerendering component and useReducer initialization

EDIT: below the line is the initial problem where I asked if my whole architecture was fine. I later edited the topic (and title) to go straight to what was my

How to create a progress bar in React?

I would like to add a progress bar to a minicart. The purpose of it is to show to users how much is needed to reach free shipping. Example: If you have items in

Mocking moment() and moment().format using jest

I'm unable to mock moment() or moment().format functions. I have states where, currentDateMoment and currentDateFormatted are getting set as below. currentDateM

How to extend React Native View and other components props with styled-components

I'm using styled-components for styling in React Native with Typescript. I created a StyledComponent that styles a View component. However, when I try to extend

Multiple React apps in one shell

I have to develop React app architecture with one Main App (Shell) and multiple Child Apps inside. Requirements 1) Main App has to provide users authenticat

Mocking moment() and moment().format using jest

I'm unable to mock moment() or moment().format functions. I have states where, currentDateMoment and currentDateFormatted are getting set as below. currentDateM

When using mode: no-cors for a request, browser isn’t adding request header I’ve set in my frontend code

in my React app, I have the following API POST to allow the user to edit their profile (name and image). static updateProfile(formData, user_id) { const

Do not fail whole task even if one of promises rejected

In redux saga if we want to handle multiple promises, we can use all (which is equivalent of Promise.all): yield all( users.map((user) => call(signUser, u

React + ASP.Net-Core CORS Problems

While CORS is a big issue when working ReactJS in combination with ASP.Net-Core I figured out how to enable CORS so when accessing my UI (http://localhost:3000)

Receiving the error BlotClass.create is not a function in ReactQuill

I am trying to create a custom font size drop-down for the toolbar in ReactQuill. I decided to strip out the original code for font-size from quilljs and expand

How to pass props to a styled component in emotion? Using TypeScript

I am using styled by emotion at: import styled from '@emotion/styled' I am trying to pass props to a styled component like the guide mentions: https://emoti

ag-grid: "How to scroll to last known position"?

Ag-Grid offers the method ensureIndexVisible(index, 'middle'); With that method it is easy to scroll to an choosen index. But how do I get the last known index

How to jump to a timestamp in a YouTube iFrame in React?

I'm trying to make a button that jumps to a specific time in an iFrame of a YouTube post, but I'm getting the error "TypeError document.getElementsById is not a

How can I change the width of Material UI Autocomplete popover

When using the Select from Material-UI, there's a prop there called 'autoWidth' which sets the width of the popover to match the width of the items inside the m

Warning: validateDOMNesting(...): <a> cannot appear as a descendant of <a>

I'm trying to use react-router with reactstrap in a create-reat-app .In the routing page i needed to use state for the reactstrap so i converted the router from

How to disable labels for additional properties with react-jsonschema-form?

I am trying to use this playground to find a schema which will allow me to show an object addable custom properties (basically I want the user to enter an assoc

Custom Style to a form created using react-json schema form

I am trying to create a form using react-json schema-form. I am new to the custom templates for the same. I would like to have all the widgets in the form in a

Deprication Warning !! After running npm start on client side project. The following error has shown. It was working before the computer shut down

npm run start [email protected] start react-scripts start (node:13940) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSet

Deep Linking with react-navigation does not work

Actually, I'm developing an app on react-native 0.58 with react-navigation 3.1.5, and I can't make my app run properly. This is my code: app-navigation.js co