Category "reactjs"

Unable to change react-select selected value color when menu is clicked

I am using react-select to select and search from a list. I need to change the text color of the selected text (that is visible in the search box) to gray when

Next.js Authentication with JWT

I am moving a project from React to Next.js and was wondering if the same authentication process is okay. Basically, the user enters their username and password

CardElement not showing ui components in react app ie `Card Number, MM/YY, CVC?

So my problem is that I cannot see the CardElement Ui component in the image below. It should be above the Order Total: $0 which is beside the payment method.

Make the dark mode button above all elements used DarkMode.js

I want to make the dark mode button above all the items on the website.I used DarkMode.js for the same.The button is hiding behind an image.How make its priorit

Display a PDF in the browser in a modal from blob data using react-pdf (@react-pdf/renderer)

I am using the handy react-pdf library to render/display/download pdf's in my React site. I have my PDF's stored on the server. I have a call to the server th

What is the difference between React component and React component instance?

I am reading this and it says: When a component is purely a result of props alone, no state, the component can be written as a pure function avoiding the

Having an issue with e.target.value returning Undefined in React

I have a feature where you can click an img and see a a list of names which are clickable....when you click a name, that persons image should take the place of

Can't seem to load custom fonts with Expo's Font.loadAsync

I'm using React Native with Expo, and it is all going well except for this one issue with custom fonts. I have my font Lobster-Regular.ttfin ./assets/fonts, and

React Router: How to stop redirecting until API returns a response?

I have a login page but that authenticates the login on router with a call to the backend. The backend returns a response 200 if the user is authenticated, and

react-custom-scrollbars can't get styling to work

I'm relative new to react but I'm trying to use a common custom scrollbar but I can't seem to get the styling to work, I also submitted this as an issue on gith

How to send an image and additional data body using fetch

I'm trying to upload an image to a serverless function on firebase. I'm sending the request like this: const updateProfileImage = (image) => { fetch(

How to make the dev tools not show up on screen by default in Electron?

I am using electron-react-boilerplate to create an Electron-React app. The dev tools show up on the screen by default. How can I make the dev tools only appear

Module build failed: UnhandledSchemeError: Reading from "alias:/path" is not handled by plugins (Unhandled scheme)

I am creating a new react app and trying to configure webpack compiler from scratch. The issue happens when running the build command with webpack -c config/web

How do you programmatically update query params in react-router?

I can't seem to find how to update query params with react-router without using <Link/>. hashHistory.push(url) doesn't seem to register query params, and

How to use horizontal weight meter in react native

I'm making a react native app now. I need to use a horizontal weight scrollbar in the app like the image which I attached. When a user scrolls the horizontal sc

react-leaflet-markercluster is not working

I'am trying to use react-leaflet-markercluster, but after I add <MarkerClusterGroup> to the code, errors are displayed in the console and the page does no

TypeError: undefined is not a function (evaluating 'this.state.list.map')

so I'm trying to push a variable onto an array called list from my state. But it is throwing off this error saying that undefined is not a function. However, wh

Is there a library similar to Vueuse but for React?

Instead of having many dependencies for individual hooks, I am interested in a single curated and tested library like Vueuse, but for React. Does something like

React: Passing down props to functional components

I have a seemingly trivial question about props and functional components. Basically, I have a container component which renders a Modal component upon state ch

VS Code Scatters Next JS Files [duplicate]

I am learning NextJS right now but I can't seem to proceed, as anytime I make a change and hit CTRL + S The codes become scattered. See screen