-
Notifications
You must be signed in to change notification settings - Fork 441
Add typescript support to issue-tracker #122
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
Open
renanmav
wants to merge
37
commits into
relayjs:main
Choose a base branch
from
renanmav:feat/issue-tracker-ts
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
e3bfb66
add typescript support to issue-tracker
renanmav ec59071
revert prettier config
renanmav 02ae738
replace non-null assertions for optional chaining on Root
renanmav a8424c6
throw if router doesnt exists on Link and remove unnecessary chaining…
renanmav f694d38
move RouteComponentProps to RouteRenderer
renanmav 9abf9fb
avoid braceless
renanmav 32c099d
update comment about @ts-ignore on RelayEnvironment.ts
renanmav bdb47e0
make Resource more precise
renanmav 97007ce
revert IssueListItem to IssuesListItem
renanmav e2098e2
revert README changes
renanmav 2c6a186
revert more README changes
renanmav d8411c5
revert e to event on IssueActions
renanmav 0285f0f
force rename of GitHub
renanmav dd2786c
return Suspense with null fallback inside SuspenseList
renanmav 4988da4
rename fragment IssueListItem to IssuesListItem
renanmav 927e2eb
make result either T of obj with default
renanmav f6547ee
revert disable button on IssueActions
renanmav 706cd71
revert the arrow function on Root
renanmav ab0b7ea
revert concat on RouteRenderer
renanmav 58e89a3
make prepare a mandatory function
renanmav 263a82e
use FetchFunction instead of typing function args
renanmav 6807f0c
throw this.load() func on read() JSResource
renanmav da5ec35
remove optional chaining
renanmav a0d4660
throw if there isnt a router on RouteRenderer
renanmav d621941
remove unnecessary assertions on router
renanmav 871bdca
add type guardian on JSResource
renanmav 6836fbd
make RouteConfig entry general
renanmav af5b394
revert changes on README
renanmav 7ddec0c
revert changes on README
renanmav 01baff6
use React.FC
renanmav 79e1a5e
add macro config to avoid false positive errors on yarn start
renanmav aa5def7
make all react components as React.FC
renanmav 7cd9538
Merge branch 'master' into feat/issue-tracker-ts
renanmav cc1c367
Update README.md
renanmav 5ba1807
Update .prettierrc
renanmav 71ce2bf
remove unnecessary children prop
renanmav 3d8ba57
Merge branch 'feat/issue-tracker-ts' of github.com:renanmav/relay-exa…
renanmav File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
make all react components as React.FC
- Loading branch information
commit aa5def74063863cdf30a0ccc5b5b5556b5e57acc
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Any reason for not destructuring the props eg.
const Link: React.FC<Props> = ({ children, to }) => {}? Same with all other instaces of React.FCAlso children is already defined by the
FCtype, so no reason to define it again inPropsinterface.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.
These destructures are really necessary? I think that they add an unnecessary complexity.
Thanks!
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.
Isn't destructing props in functional components the standard? How is this complexity? If you did that you could remove 8 unnecessary
props.just in that component.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, but I would add 8 unnecessary new lines to destructure. I'd have 16 lines between destructuring and usage against 8 lines with actual strategy.
In fact, using
props.<propName>enforces that this data comes as props.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.
So... I guess this is pretty basic stuff but...
Changing
const Link: React.FC<Props> = props => {}toconst Link: React.FC<Props> = ({ children, to }) => {}means that, in just that Link component, you can removeprops.from 7 instances ofprops.toand 1 instance ofprops.fromprops.children... how is this adding complexity to you... or 16 new lines. If anything it reduces redundancy (or what am I not seeing here?)Sorry, what you say makes no sense to me. Thought everyone was doing it since ES2015. Maybe read this.