This assignment is intented to help you set up your development environment for React. You will create a simple React App and deploy using one of the methods covered in lecture.
- Install
npx
following the instructions here: https://www.npmjs.com/package/npx - run
npx create-react-app my-first-app
to create the React application - In the newly created app, replace the contents of
App.js
including your name:
import './App.css';
function App() {
return (
<div className="App">
<header className="App-header">
<p>Hello CSCI E-39!</p>
<p>
My name is ____________
</p>
</header>
</div>
);
}
export default App;
- move all of the contents of
my-first-app
to the repos root directory (e.g. for mac/linuxrm my-first-app/README.md && mv my-first-app/* .
). You are going to want to keep this README.md and not the one generated bycreate-react-app
- run
npm install
- start the app with
npm start
- verify the app is running
- modify line 6 in
App.test.js
to:
const linkElement = screen.getByText(/Hello CSCI E-39!/i);
- make sure all tests pass when running
npm run test
Deploy the application using Github Pages (https://github.com/prof-tejera/react-deployment-code#github-actions) or a different method if you prefer. As long as the URL is avaliable on the public internet and live for 2 weeks, then you can use whatever method you want.
Edit this file (README.md) and complete the following:
- URL to live application: https://prof-tejera.github.io/homework-2-car1sle
- What code editor are you using? VSCode
That is all!