Category "reactjs"

Map not showing in mapbox

I'm using mapbox api for my application where user can add markers based on his current location. The map was loading just fine while it was running on localhos

How to import image (.svg, .png ) in a React Component

I am trying to import an image file in one of my react component. I have the project setup with web pack Here's my code for the component import Diamond from

React native styling. width: percentage - number

I want to do width: 100% - 50 so I can add an icon which is 50 wide on the right hand side of it. I have got width: 100% - 20% working by using react-native-e

Warning: `value` prop on `input` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components

React keeps giving me this "Warning" (which registers as an error in the console) whenever I click on the edit row section of the material table. I understand t

PWA support in NextJs

we would like to build a fully offline capable react web application. We usually work with NextJS. The current problem that we are facing is that we are not abl

how to change the asterisk color in required * field

I have two required fields in my form .I want the asterisk color should be red.Currently it is showing black .I am using material UI react library ? here is my

StyledComponents with Typescript and ThemeProvider. What are the right types?

I have problems to get the right types when using StyledComponents with ThemeProvider. I have tried it with this approach: https://github.com/styled-components/

Change State whenever button is clicked back and forth in React?

So I know how to change state when the button is clicked once, but how would I change the new state back to the previous state when the button is clicked again?

Support for the experimental syntax 'jsx' isn't currently enabled

I'm trying to run very simple code, but I'm getting an error, I didn't use the create react app! It looks like my babel.config.js file is being ignored! This is

Module not found: Can't resolve '../../assets/img-3.jpg' in ''

I am trying to import some local images into reactjs. But it's not working. I am using reactstrap to make a carousel. This is the error: Module not found: Can'

Add {NavLink} to React Component Showing Blank Pages

I'm new to React.js and already make new react app using : create-react-app I already install dependency react-router-dom var React = require('rea

React hooks: how to instantiate instance variable only once

I would like to derive value from my props using react hooks. I would like to compute this value only once and not on every render. This is the first solution I

Data Transfer size from server to browser (Data downloaded/bandwidth usage)

I am working on a video streaming application in javascript, i want to tell user how much mbs of data user have consumed/used or how much data has been transf

Generating groupings within a Material UI Select component dynamically from data

I need to generate the groupings of my Select component dynamically and would like to use the component in a controlled way. (As opposed to uncontrolled.) This

React Router target div id in home page

I am using react router specifically the HashRouter since I am trying to host my react app on github pages. Prior to using the HashRouter I was just using the B

How to change results as far as I move map in react-instantsearch-dom-maps

I am currently working with algolia and I have some strange issue with the map. I have this interface (left column is results, right column is map) like on this

Validate Jwt signature

I have an app with React in the frontend and SpringBoot in the backend for the API, when I login with some user it saves the token in localStorage and you can m

How to handle the render of a large list of items in react?

I have a large list of items to render and list data get updated in realtime with socket-io. How to handle performance issues? it gets updated heavily and table

Change borderBottomColor of MUI TextField when input is filled

I'm creating a form using MUI, by default TextField bottom border is grey, blue on focus then again grey on focus loss. I aiming to make it not lose blue color

Do you need a web server to run a production build of a react app on a VPS?

I have built a react app using a truffle box that uses create-react app. I can get the app running on my local host but I can't see it on my VPS when I go to th