Questions tagged [create-react-app]

create-react-app is a starter-kit for creating React applications with no build configuration. If you’re getting started with React, use this to automate the build of your application. There isn't any configuration file, and react-scripts is the only extra build dependency in your package.json file. Your environment will have everything you need to build a modern React application.

Getting Started

5893 questions
3
votes
2 answers

antd custom primary color

I am using antd and create-react-app to create my application. I following this examplle:https://github.com/ant-design/antd-init/tree/master/examples/customize-antd-theme Here they have given example using webconfig. When i tried to replacete the…
DadyByte
  • 894
  • 6
  • 18
  • 30
3
votes
0 answers

Module not found: Can't resolve 'sass-loader' in '/app'

I created a react project with "create-react-app". I ejected the project to access the webpack files because I wanted to use SASS/SCSS... Everything works fine when I run the project at localhost, but when I deploy my project to Heroku, the page…
maverick
  • 800
  • 2
  • 13
  • 30
3
votes
1 answer

CSS variables not resolving when file is imported into another file

I am working on a project where I am developing a set of UI components for developers to use to build out their sites. I have created an NPM package which consists of just the CSS required to implement an Accordion component. I installed my…
James Howell
  • 1,392
  • 5
  • 24
  • 42
3
votes
0 answers

create-react-app + configs for endpoints/keys

I am using 'create-react-app' npm from React starter https://github.com/Microsoft/TypeScript-React-Starter, How do I have different config files for different environments (e.g. Dev, CI, production)? I want to store the endpoints, some app settings…
Michael Sync
  • 4,834
  • 10
  • 40
  • 58
3
votes
2 answers

How to enable hot reloading for the build folder in create-react-app?

I have a React application created using create-react-app. I also have an external application that is using this application by including the bundled JS and CSS files (the ones create using the build script). Right now, I'm using the React template…
Farzad
  • 1,770
  • 4
  • 26
  • 48
3
votes
1 answer

React CRA - Images Ecosystem

When using create-react-app, in what directory should my images folder be? in src or public? Will one or the other present issues when I'm ready to run yarn build? I heard that only files placed in public directory will be loaded after a build. True…
Null isTrue
  • 1,882
  • 6
  • 26
  • 46
3
votes
1 answer

How to Open Raw HTML (.html) in React 'Public' Folder?

I'm creating static .html files from my React Apps with https://github.com/gajus/usus (background job) and put it in the /public and make new folder ie. /article/ Issue : whenever I open that html file ie. aaa-bbb-ccc-ddd.html it is rendered firstly…
3
votes
2 answers

React imported image within a function

I want to display dynamically an imported image within a function on React (create-react-app). Code: import React, { Component } from 'react'; import reactImg from './img/react.png'; export default class MyPage extends Component { …
Franck Boudraa
  • 123
  • 1
  • 2
  • 14
3
votes
1 answer

URLs not found after deploying create-react-app build to Google Cloud Platform

I've uploaded a create-react-app build (with an app.yaml file) to a GCP bucket. The app has then been deployed on a App Engine instance using the cloud shell. Going to the app's root URL works fine. But going to example.com/anything returns the…
3
votes
1 answer

React | import images from URL-holding variables - why am I getting wrong paths?

I read a bit about answers but haven't found something that's what I'm looking for. Please refer me to a relevant question and delete my question if it's after all a duplicate. I've got the following file…
Gal Grünfeld
  • 800
  • 3
  • 9
  • 32
3
votes
3 answers

Push notification in Create-react-app (Web)

In my React App, I want to implement push notification. What I've done so far. In the service worker registration step, I added some codes to initialize push manager that handles user subscription, now my app will prompt user to subscribe to push…
Matt Downey
  • 363
  • 6
  • 18
3
votes
0 answers

create-react-app 'propTypes' is not defined (no-undef)

I am following the Redux Github repo's example/todomvc and encountered the following issue: [eslint] 'propTypes' is not defined. (no-undef) The code related to this issue, export default class Header extends Component { static propTypes = { …
Sven
  • 31
  • 2
3
votes
0 answers

Ignoring certain Url path-names in Service Worker for Create React App

the url that is ignored by default in Create React App Service Worker is the following for firebase auth "__" urls, it is done like so: navigateFallbackWhitelist: [/^(?!\/__).*/] **using the same negative Regex method I tried adding to the array…
jasan
  • 11,475
  • 22
  • 57
  • 97
3
votes
1 answer

create-react-app's 'npm start' doesn't work, even with newly built apps. Errors thrown inside chokidar node_module

Run into this error when using 'npm start test_app' on a newly created application using 'create-react-app'. This problems also shows up on my previously created projects using create-react-app. I've tried updating the node version to v8.9.1 and the…
3
votes
1 answer

Best option for i18n with create-react-app (react / router / redux / typescript)

I used create-react-app-ts to create a new React app. What is the best option for adding i18n? I looked at react-intl but it looks quite heavy to work with. Then I looked at linguiJS which promises to make it easier, but I can not find examples of…
olefrank
  • 6,452
  • 14
  • 65
  • 90
1 2 3
99
100