While it may use webpack, Babel and other amazing projects to power your app, it provides a cohesive, curated experience atop all these. No Configuration Required - there's less to learn because there's nothing to configure. All configurations are well-handled so you can focus on your code.
No Lock-In - "eject" anytime to move to a more custom setup. With a single command, you can move all configuration and build dependencies directly to your project. Easy Setup and Maintenance - all you need is one command to get started, and one command to upgrade to a new version. Project Samples. Project Activity. Categories Software Development , Build Tools.
License MIT License. Mit einem Experten sprechen. Another advantage of using create-react-app is that you don't have to deal with Babel or Webpack configurations. All of the necessary configurations will be made by create-react-app for you.
According to the React document ation , create-react-app is one of the officially supported ways to create single-page applications in React. You can find other ways here. In order to install your app, first go to your workspace desktop or a folder and run the following command:. The installation process may take a few minutes. After it is done, you should see a folder that appears in your workspace with the name you gave to your app. We also need to load the environment variables from our SST app.
With the following:. Here we are adding a simple button that when clicked, makes a request to our API. We are getting the API endpoint from the environment variable, process. We use that to display the count of the number of times the button has been clicked. And if you head over to your browser and click the button again, you should see the count increase! If you head over to the SiteUrl in your browser, you should see your new React app in action! A local development environment, to test and make changes.
Check out the repo below for the code we used in this example. And leave a comment if you have any questions! To create a project, run:. Learn Next. Gatsby is the best way to create static websites with React. Learn Gatsby from its official guide and a gallery of starter kits. The following toolchains offer more flexibility and choice. We recommend them to more experienced users:.
0コメント