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.
Questions tagged [create-react-app]
5893 questions
3
votes
2 answers
How to write a React Stateless Functional Component in Typescript?
I have this:
import React, { useReducer } from 'react';
import { Item, List } from '../Types';
type Props = {
items: List;
};
const TodoList: React.SFC = ({ items, children }) => {
return items.map((item: Item) =>

johnnyshrewd
- 1,038
- 2
- 12
- 29
3
votes
1 answer
React not fetching data from the updated env file
There are some environment variables in my .env file that gets updated when some values get updated on the database.
Example:
REACT_APP_FIREBASE_ID=1234567890
When I log this to the console on my react…

Saurabh
- 2,655
- 1
- 20
- 47
3
votes
0 answers
How to solve critical css with Create React App?
How are you handling critical css with in CRA project?
I tried to use
const Critters = require('critters-webpack-plugin');
Critters github official page
Critters webpack plugin with react-app-rewired.
Also I tried to use isomorphic-style-loader…

Patryk Janik
- 2,476
- 2
- 13
- 23
3
votes
3 answers
Where to place webpack.config.js in create-react-app project
I have been instructed to put some instructions inside the webpack.config.js file.
However in my create-react-app project I cannot find that file.
Currently the available answer on StackOverFlow requires ejecting the project which I think will break…

preston
- 3,721
- 6
- 46
- 78
3
votes
0 answers
How to make absolute path in create react app?
I have configured my eslint config to use absolute path . I used this manual https://dev.to/oliverandrich/absolute-imports-with-create-react-app-and-vscode-ihn . Everything runs fine, but eslint shows an error "Absolute imports should come before…

Yerlan Yeszhanov
- 2,149
- 12
- 37
- 67
3
votes
1 answer
jest test cannot import cesium using create react app and craco
I am using create react app with craco, and craco-cesium to load cesium into my project. I am trying to setup jest to start creating tests but the issue is Cesium is using requireJS.
I added the following to my package.json
// package.json
...
…

ArmenB
- 2,125
- 3
- 23
- 47
3
votes
0 answers
Trying to deploy React app on heroku. App's api works fine locally but when I deploy to heroku the api doesn't work
I am using Node+Express for my back-end. At first I tried using "proxy": http://localhost:3001 in the react client's package.json but that caused an Invalid Host Header message when I tried to open my site on heroku.
I followed these insturctions…

srtalaie
- 31
- 2
3
votes
1 answer
Heroku create-react-app deploy Uncaught SyntaxError: Unexpected token <
Whenever I deploy my heroku app with the create-react-app buildpack, the first time I try to access my domain, the page loaded is white and there is an error in the developer console saying
Uncaught SyntaxError: Unexpected token <
in the file…

rma
- 1,853
- 1
- 22
- 42
3
votes
1 answer
How to specify the custom URL when i enter npm start in create-react-app
I wanted to load custom URL when i load the react using npm start in create-react-app. By default it will open localhost:somePort/.
But i need locahost:somePort/somestuff

iamPavan
- 255
- 4
- 15
3
votes
1 answer
create-react-app with Firebase hosting init script
I'm trying to follow step 3 here, "Add Firebase SDKs and initialize Firebase", with the "From Hosting URLs"
I'm including these three scripts inside the head section of the public/index.html page: