This is the official React template for Bod CLI.
Based on templates:
This template is shipped with Bod CLI out of box:
# Select option `React Framework`
npx bod create my-app
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests
for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode
and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Specify the homepage
in your package.json
:
{
"homepage": "http://mywebsite.com/relativepath"
}
Change basename
of Router
:
<BrowserRouter basename="/calendar"/>
<Link to="/today"/> // renders <a href="/calendar/today">
See more details [https://create-react-app.dev/docs/deployment/#building-for-relative-paths].
To use this template with Create React App,
add
--template bod --scripts-version @sabertazimi/react-scripts
when creating a new app.
For example:
npx create-react-app my-app --template bod --scripts-version @sabertazimi/react-scripts
yarn create react-app my-app --template bod --scripts-version @sabertazimi/react-scripts
You can learn more in the Bod GitHub repository.
To learn Create React App
, check out the Create React App documentation.
To learn React
, check out the React documentation.