Skip to content

Typescript Migration - Front End - #15

Open
marked01one wants to merge 37 commits into
mainfrom
typescript_migration_frontend
Open

Typescript Migration - Front End#15
marked01one wants to merge 37 commits into
mainfrom
typescript_migration_frontend

Conversation

@marked01one

Copy link
Copy Markdown
Member

Migration from JS to TS - React Native Front End

  • All current React components have been translate from JavaScript to TypeScript.
  • The only exception is jest files and Root.js

@lxkedinh

Copy link
Copy Markdown
Collaborator

I'm getting this error after trying to launch with Expo Go. I'm on the latest commit and updated my dependencies.

 ERROR Error: Objects are not valid as a React child (found: object with keys {children}). If you meant to render a collection of children, use an array instead.
This error is located at:
in UserProvider (created by Root)
in Root (created by withDevTools(Root))
in withDevTools(Root)
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
in main(RootComponent)

@marked01one

Copy link
Copy Markdown
MemberAuthor

I'm getting this error after trying to launch with Expo Go. I'm on the latest commit and updated my dependencies.

 ERROR Error: Objects are not valid as a React child (found: object with keys {children}). If you meant to render a collection of children, use an array instead.
This error is located at:
in UserProvider (created by Root)
in Root (created by withDevTools(Root))
in withDevTools(Root)
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
in main(RootComponent)

Yeah, it's a TypeScript error I'd assume. Tried converting Root.js to TS and got similar looking errors from the IDE. Working on it soon

@GuyWhoCode

Copy link
Copy Markdown
Member

I'm getting this error after trying to launch with Expo Go. I'm on the latest commit and updated my dependencies.

 ERROR Error: Objects are not valid as a React child (found: object with keys {children}). If you meant to render a collection of children, use an array instead.
This error is located at:
in UserProvider (created by Root)
in Root (created by withDevTools(Root))
in withDevTools(Root)
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
in main(RootComponent)

This error should have been resolved with the latest commit. Please run again to test.

lxkedinh
lxkedinh previously requested changes Mar 21, 2023

@lxkedinhlxkedinh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a few small changes regarding incorrect file names, but the app runs fine now. Login functionality isn't working but I'm assuming it's because of the issue Deric still needs to fix.

image

Comment threadpackages/app/screens/landing/LandingScreen.tsx Outdated
Comment threadpackages/app/screens/feed/FeedScreen.tsx Outdated
@lxkedinh

Copy link
Copy Markdown
Collaborator

Is there a reason you guys are using .tsx file extensions for everything? I think the typical convention is .tsx is only used for files that contain JSX. Other typescript files with utility functions should be just .ts like utils/constants.ts

@nappalionnappalion left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! You can take a look at the comments and decide whether or not they're necessary and then merge with main when you can.

Comment threadpackages/app/package.json Outdated
Comment threadpackages/app/screens/landing/LandingScreen.tsx
Comment threadpackages/app/components/EventCard/EventCard.tsx Outdated
Comment threadpackages/app/metro.config.ts
Comment threadpackages/app/screens/feed/FeedDrawer.tsx
Comment threadpackages/app/screens/feed/FeedScreen.tsx
Comment threadpackages/app/screens/group/GroupScreen.tsx
Comment threadpackages/app/utils/UserContext.tsx Outdated
Comment threadpackages/app/utils/UserContext.tsx Outdated
Comment threadpackages/app/utils/datalayer.ts
@nappalion
nappalionforce-pushed the typescript_migration_frontend branch from 0e81aed to 46bcfbaCompareDecember 8, 2023 08:34
@nappalion
nappalion dismissed lxkedinh’s stale reviewDecember 8, 2023 21:46

Login functionality is now working (old review message).

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@marked01one@lxkedinh@GuyWhoCode@nappalion