-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix TypeScript Errors and add Redux #64
Conversation
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.
Looks solid. Just a couple tiny nitpicks.
@@ -49,14 +49,18 @@ | |||
}, | |||
"dependencies": { | |||
"@types/jest": "^24.0.23", | |||
"@types/node": "^12.12.11", |
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'm curious, what do we need Node types for?
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 think this was an issue to do with making TypeScript recognize process.env
as a global. I should look into it as it's been a few weeks.
export const useCategories = () => {}; | ||
|
||
// Returns a list of subtypes for a category | ||
//export const useSubTypes = category => {}; |
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.
Are these being used? If not could we get rid of them for now?
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.
Yeah for sure. I think for now, I should remove any code like this or that isn't being used. The app doesn't use redux yet, but I think it'd be good to merge in TypeScript for now.
Because of git wierdness, I'm creating a new PR for this. |
Work in Progress
Redux Refactoring
Close #54 - WIP, but TypeScript & redux were added and have basic setup
redux react-redux redux-thunk
/src/index.html
useAPI
with redux/categories
and/search
pages toFixed TypeScript Path Error
@types/node
to allowprocess
to be typed globally.My solution: Use
tsconfig.json
,package.json
and the official parcel docs to fix this.