-
Notifications
You must be signed in to change notification settings - Fork 1
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
Refactor to typescript attempt #50
base: main
Are you sure you want to change the base?
Conversation
- install types and necessary dependencies; - add TypeScript configuration; - change extention of files to .tsx; - add User and Item types.
…rn in the input element
… List component; removed temporary console.log from Home component
…n in case userId or userEmail is undefined
userId: string | null | undefined, | ||
userEmail: string | null | undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this might simplify a little bit
userId: string | null | undefined, | |
userEmail: string | null | undefined, | |
userId?: string | null, | |
userEmail?: string | null, |
{ | ||
"compilerOptions": { | ||
"target": "es6", | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"jsx": "react-jsx", | ||
"strict": true, | ||
"esModuleInterop": true, | ||
"skipLibCheck": true, | ||
"forceConsistentCasingInFileNames": true | ||
}, | ||
"include": ["src"] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build works on my end now with the vite command.
I wonder if it was the file name change from vit2.config.js > vite.config.ts that did it.
I also see the built files in /build
too which makes things nicer. 🙌🏻
Description
This code proposes refactoring our application to TypeScript. These changes will keep the app type safe, scalable and easy to read and to debug.
Some console logs are still in place as the work is still in progress.
Type of Changes
enhancement
Updates
Added types.
Issues
Testing Steps / QA Criteria
npm start
and navigated to localhost:3000,