- Get experience writing your own React code
In this outline, you'll create a React app for frontend Eventonica project.
We will be working from the same set of Eventonica Requirements as all parts of this project.
First create a folder for your Eventonica project and move inside that directory.
mkdir Eventonica
cd Eventonica
To create a React app, you can use the tool npx
. npx gives you the ability to use the create-react-app
package without having to first install it on your computer, which is very convenient.
npx create-react-app client
cd client
npm start
Once you run this command, a folder named "client" will be created and all of the packages it requires will be automatically installed.
Then open http://localhost:3000/ to see your app.
-
Inside
/src/App.js
, delete all the code. In its place, add code from starter-code. You should see your UI update automatically onlocalhost:3000
to an Eventonica form. If there's an error,ctrl + c
andnpm start
again. -
Go to
client/src/App.css
and delete the contents. You can also delete the file itself forclient/src/index.css
. Replace theApp.css
contents with all the CSS code from css-starter-code. You should see 2 columns on your form now onlocalhost:3000
. -
Drag and drop, or copy and paste, calendar icon in the
src
folder.Please ignore calender icon in this image
-
Look at all the code that's now in your App component. Take 2 minutes to point out to yourself where repeated elements might be turned into a reusable component later.
Note:
Remove.git
folder from your react app before pushing into your github repo.
Navigate to yourclient
folder in the terminal.
Remove the.git
folder usingrm -rf .git
command.
Come out of client folder usingcd ..
.
Inside Eventonica directory, initialize Git repository and push all your code to Github.