@bun-examples/react v0.1.101
React Bun App
This is a single-page application project template using React and Bun. Run the following commands to get started.
bun create react ./react-bun-app
cd react-bun-appThe bun create command will automatically install the required dependencies. To start the dev server:
bun run devThen open http://localhost:3000 with your browser to see the result.
This bundles src/index.tsx and starts a development server that serves from the public and build directories. When the incoming request to localhost:3000/ comes in, the following exchange occurs:
- The Bun server returns
public/index.html. - The browser renders this HTML, which contains a
scripttags withsrc="/index.js". The browser requests this file. - The server checks for this file, first in
public(no match) then inbuild. It findsbuild/index.jsand returns it to the browser. - This file renders the React component in
src/App.tsxinside thediv#rootelement. The app is now ready to accept user input.
Start building your app by editing src/App.tsx.
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago