- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 552
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
feat: rewrite indexes to TS #794
Conversation
const { enabled = true } = this.props; | ||
|
||
if (!ENABLE_SCREENS || !enabled) { | ||
// Filter out active prop in this case because it is unused and | ||
// can cause problems depending on react-native version: | ||
// https://github.com/react-navigation/react-navigation/issues/4886 | ||
|
||
/* eslint-disable no-unused-vars */ | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars |
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.
Why you need this here?
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.
IIRC, we were trying to avoid sending props that did not belong there to the View
so we extract enabled
.
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.
You can prefix it with an underscore: _enabled
and then eslint should throw this error.
} | ||
|
||
export class NativeScreen extends React.Component<ScreenProps> { | ||
render(): JSX.Element { |
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.
Typing render method on class-based react component seems redundant.
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.
For some reason eslint warns if I remove it here, but it doesn't in index.native.tsx
.
e80b888
to
94d71d8
Compare
Description
PR migrating index files from the library library to TS 🎉
Changes
Changed
index.native
,index
files to TS.Removed
index.d.ts
.Added
types.tsx
.Changed
package.json
s to properly match new structure of files inlib
folder.Changed
tsconfig.json
in root to include only files fromsrc
and addedtsconfig.json
for TestsExample project.Checklist