Skip to content

a4-Mahir-Sowad #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: { react: { version: '18.2' } },
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.env

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
34 changes: 6 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,11 @@
Assignment 4 - Components
===
# Assignment 4 - Components

Due: October 4th, by 11:59 AM.
## TODO List Application From A2 In React and Express

For this assignment you will re-implement the client side portion of *either* A2 or A3 using either React or Svelte components. If you choose A3 you only need to use components for the data display / updating; you can leave your login UI as is.
Glitch Link: [https://a4-mahirsowad3.glitch.me/](https://a4-mahirsowad3.glitch.me/)

[Svelte Tutorial](https://github.com/cs-4241-23/cs-4241-23.github.io/blob/main/using.svelte.md)
[React Tutorial](https://github.com/cs-4241-23/cs-4241-23.github.io/blob/main/using.react.md)
Note about Glitch Link: If you get a **Cannot GET /** error upon loading the Glitch project, please just refresh the page and it should work on the refresh.

This project can be implemented on any hosting service (Glitch, DigitalOcean, Heroku etc.), however, you must include all files in your GitHub repo so that the course staff can view them.
This is a remake of the TODO List Application from A2 using React for the frontend and Express for the backend. In order to serve both the frontend and backend from the same server port, the vite-express module was utilized. I had some challenges setting this up in the beginning but was able to figure it out with some help from Akim, the class TA. For this assignment, I took my index.html file from A2 and split it up into smaller and more modularized components. I thought that React improved the development experience for me. It made me think more carefully about the design of my application, break it up into logical and more maintainable components. The large index.html file that I had from A2 was getting very complex and difficult to make changes to. In React, I split up my components into a logical structure that made more sense in terms of long-term maintainability. I split up the index.html into 3 broad components: Header, Main, and Footer components, which correspond to the header, main body, and footer sections of the webpage respectively. Inside of the Main component, I split the content up even further into a Form and ResultsTable component. And inside of the ResultsTable, I populated it with a list of TableRow components. I was having some difficulty at first wrapping my head around passing functions down through multiple child components, but it made more sense to me as I neared the completion of the remake. Also, achieving things such as rendering multiple rows, displaying JS varaibles in HTML, and updating all visual instances that uses the value of a certain variable is very straightforward and simple to accomplish in React in contrast to Vanilla JavaScript.

Deliverables
---

Do the following to complete this assignment:

1. Implement your project with the above requirements.
3. Test your project to make sure that when someone goes to your main page on Glitch/Heroku/etc., it displays correctly.
4. Ensure that your project has the proper naming scheme `a4-firstname-lastname` so we can find it.
5. Fork this repository and modify the README to the specifications below. Be sure to add *all* project files.
6. Create and submit a Pull Request to the original repo. Name the pull request using the following template: `a4-firstname-lastname`.

Sample Readme (delete the above when you're ready to submit, and modify the below so with your links and descriptions)
---

## Your Web Application Title

your hosting link e.g. http://a4-charlieroberts.glitch.me

Include a very brief summary of your project here and what you changed / added to assignment #3. Briefly (3–4 sentences) answer the following question: did the new technology improve or hinder the development experience?

Unlike previous assignments, this assignment will be solely graded on whether or not you successfully complete it. Partial credit will be generously given.
### Note: I have been granted an extension approved by Professor Roberts
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Assignment 4 - Components</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
Loading