RocketChat / RocketChat/Rocket.Chat.ReactNative

Improvement: Replace any types with proper navigation stack types in navigation refs

Open
#6,806 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.4k
Forks
1.5k
Avg merge
1d 18h
Merged PRs (30d)
90

Description

Right now in project, the navigation reference files (appNavigation.ts and shareNavigation.ts) are using any for the navigation types. Because of this, TypeScript cannot check if I am navigating to the right screen with the right parameters.

No type safety — TypeScript can’t tell me if I'm passing wrong params to a screen.

Runtime errors — I might navigate with wrong params and not know until the app crashes.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with appNavigation.ts and shareNavigation.ts, then trace the navigation stack types used by those references. Replace the any navigation types with the appropriate stack types and verify that navigation targets and parameters are checked by TypeScript.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.