Skip to content
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

Typescript Migration - Front End #15

Open
wants to merge 37 commits into
base: main
Choose a base branch
from

Conversation

marked01one
Copy link
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
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
Member Author

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
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.

Copy link
Collaborator

@lxkedinh lxkedinh left a comment

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

packages/app/screens/landing/LandingScreen.tsx Outdated Show resolved Hide resolved
packages/app/screens/feed/FeedScreen.tsx Outdated Show resolved Hide resolved
@lxkedinh
Copy link
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

Copy link
Member

@nappalion nappalion left a comment

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.

packages/app/package.json Outdated Show resolved Hide resolved
packages/app/components/EventCard/EventCard.tsx Outdated Show resolved Hide resolved
packages/app/metro.config.ts Outdated Show resolved Hide resolved
packages/app/screens/feed/FeedDrawer.tsx Outdated Show resolved Hide resolved
packages/app/screens/feed/FeedScreen.tsx Outdated Show resolved Hide resolved
packages/app/screens/group/GroupScreen.tsx Outdated Show resolved Hide resolved
packages/app/utils/UserContext.tsx Outdated Show resolved Hide resolved
packages/app/utils/UserContext.tsx Outdated Show resolved Hide resolved
packages/app/utils/datalayer.ts Outdated Show resolved Hide resolved
@nappalion nappalion force-pushed the typescript_migration_frontend branch from 0e81aed to 46bcfba Compare December 8, 2023 08:34
@nappalion nappalion dismissed lxkedinh’s stale review December 8, 2023 21:46

Login functionality is now working (old review message).

Sign up for free to 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