How to enlarge the SVG icon in material-ui iconButtons?

Has anyone build webpages using react.js and the Material UI library? How should I resize the icon size? It is a svg icon. I just built an "create new" component, which is a piece of material...

How do I use an SVG in React without using dangerouslySetInnerHTML?

I've created a React component for the Facebook icon to be able to use in the footer. Unfortunately it doesn't work unless I use dangerouslySetInnerHTML, so the icon shows up - however it appears...

Is it possible to use arrow functions in classes with ES6?

My question is very simple. If I have a class in ES6 is it possible to use an arrow function within it? import React, { Component } from 'react'; export default class SearchForm extends Component...

Cound not find icon react-fontawesome

I have a project on React and I need to integrate FontAwesome to it. I found official [library][1] and installed it as instructed in readme $ npm i --save @fortawesome/fontawesome $ npm i --save...

In Ant Design, how can we center <Icon> vertically in <Row>?

Please see my React code example: import React from 'react'; import { Row, Col, Icon } from 'antd'; const MyRow = () => ( <Row type="flex" align="middle"> <Col md={10}>Trouble is a...

React + Material-UI - Warning: Prop className did not match

I'm having difficulty with differences between client-side and server-side rendering of styles in Material-UI components due to classNames being assigned differently. The classNames are assigned...

React - vertically align text and icon

I have tried all things to align vertically an icon and a text, Code: <Danger color="secondary" style={{ flex:1,justifyContent: "center",alignItems: "center" }}> <ErrorOutline ...

Why is that when i run my react build on Apache...Just blank page appears..?

app is working fine in node server but i am getting blank page in Apache server even though i used absolute path. Here is the index.html code <head> <meta charset="utf-8"> <meta...

React Native: com.android.build.api.transform.TransformException: Error while generating the main dex list

I haven't change anything and now my project doesn't work. I have been getting this error since this morning: What went wrong: Execution failed for task...

Rendering website in different viewports [ Mobile, Tablet, Desktop ] on Desktop Browser window

I was building an app similar to WIX that enables user to create website easily. On Top, there are these three icons (Desktop, Mobile, Tablet) for users to select and view their website in that...

Jest failing to test component that imports FontAwesomeIcon

I am trying to test a simple functional react-native component using Jest and react-test-renderer. After importing the FontAwesomeIcon component into my component, my tests are failing with the...

React Native Multiple command produce same file

I tried to build a react native app for iOS and I hit this error: Build system information error: Multiple commands produce...

Podfile.lock missing when initial react-native run-ios

I am setting up IOS dev for React Native (0.61) app which has the working android version. What I did was to copy src of components and package.json file after react native environment is setup by...

Jest cannot load svg file

In my app I use React and TypeScript. I tried to run jest tests I get following...

marker icon isn't showing in Leaflet

I 've put together a very simple React / Leaflet demo but the marker icon is not showing at all. Full running code is here. Here's what I have in my componentDidMount method: componentDidMount()...

Highlight Current Active Drawer menu in React navigation v5

I have created a custom drawer navigator using react navigation version: 5.X, But the current active tab is not getting highlighted in custom drawer menu. I have added 'activeTintColor' in...

error: bundling failed: TypeError: Cannot read property 'transformFile' of undefined, React Native

I receive this error whenever I run react-native start, but this started happening recently after I had installed firebase-tools and stripe in my node modules, but before that it would run just...

Unable to use useState in class component React.js

I am trying to create constants in react as follows: const [firstFocus, setFirstFocus] = React.useState(false); const [lastFocus, setLastFocus] = React.useState(false); The constants are being...

Icon is not displaying in react-navigation-header-buttons (React Native)

I am trying to add an icon to the headerRight using react-navigation-header-buttons library. But the title of the icon is displaying instead of the icon. This is the code where icon should...

Sending a React.FunctionComponent<React.SVGProps<SVGSVGElement>> as a prop to another component

I'm attempting to import a React functionComponent from an SVG and then send that to another component as a prop to render that svg. With the setup below, this compiles fine, but eventually...

React Native Paper Button icon size

Hey is there a way to set the size of my Button Icon? <Button contentStyle={[accordionStyles.header__button, ]} icon={show === Props.value ? "chevron-up" : "chevron-down"} direction='rtl' ...

GTM Unable to stringify circular structure (SVGSVGElement) in React App

I am trying to implement Google tag manager in my React Web App but facing an issue due the circular structure of SVGSVGElement I have added some custom SVG icons in my component using import...

Type 'string' is not assignable to type 'ImageSourcePropType'

Background I'm trying to use a SVG component which has the property xlinkHref within an Image tag. The file was a plain SVG but I turned it into a React Native Component (TSX) using...

Building a Shopify App - How to Load Different Pages?

I am using the Shopify CLI NodeJS tutorial to get started. https://shopify.github.io/shopify-app-cli/app/rails/commands/#generate I've been easily adding Polaris Components but I'm having trouble...

React Leaflet - Marker image fails to load

Issue I'm using leaflet v1.7.1 and react-leaflet v3.0.5 in my React project. When I try out the setup example in React Router's "Setup" documentation page, the marker icon becomes a broken image...

React Native Paper Dark Theme on IOS

I want to use react-native-paper dark theme on my apps, however, all my <View> are still had a white background and causing all the Text component unreadable because the text turns white in dark...

withRouter' is not exported from 'react-router-dom

After npm i --save react-router-dom and npm install --save with-router I tried to write import {withRouter} from 'react-router'; But I Get this error Attempted import error: 'withRouter' is not...

ReactJs refresh issue with React-Table

I was able to load data from my API in a table row using react-table. The compilation is working and I can see the data on the App page. But when I refresh the page, the data is not here...

Unrecognized font family 'anticon'

I've been coding along with a YouTube tutorial and have been running into this error message. I have the proper import statement and the proper dependency installed so I'm not sure what the issue...

console.error Error: Could not parse CSS stylesheet

I'm having the follow error when running my tests with jest. console.error Error: Could not parse CSS stylesheet at exports.createStylesheet...