-
Notifications
You must be signed in to change notification settings - Fork 15
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
Use React.StrictMode
and type-safe translation keys with i18next
#708
Merged
Conversation
This file contains 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
Uh oh. I had that locally once but it disappeared. Mhpf, that would be a problem. Will look into it! |
LukasKalbertodt
force-pushed
the
more-frontend-checking
branch
from
February 21, 2023 09:36
2351114
to
d31f626
Compare
LukasKalbertodt
force-pushed
the
more-frontend-checking
branch
from
March 6, 2023 17:51
d31f626
to
de3af43
Compare
github-actions
bot
added
the
status:conflicts
This PR has conflicts that need to be resolved
label
Mar 6, 2023
This comment was marked as resolved.
This comment was marked as resolved.
Strict mode helps finding bugs early by doing a number of things during development only (e.g. rendering each component twice). It required two adjustments: - The router would incorrectly dispose the initial route under strict mode. A rather simple fix was used to make it work. It's still not perfect, but at least it works. - We now pass a ref directly to `Transition` to avoid it using `findDOMNode` (deprecated) internally.
LukasKalbertodt
force-pushed
the
more-frontend-checking
branch
from
March 6, 2023 17:53
de3af43
to
e1d9be8
Compare
github-actions
bot
removed
the
status:conflicts
This PR has conflicts that need to be resolved
label
Mar 6, 2023
This unfortunately required quite a few other changes. - ESlint needed to be configured to parse it as TS. This also meant that tsconfig needed to include the new TS file, otherwise eslint would error. - Dealing with `constants.js` was very annoying as it's used by webpack and relay configs. Relay can't be typescript AFAIK. I couldn't figure out how to properly import it in both files so I decided to delete it and inline those constants. It's reaaaaally not a big deal. The only thing that is repeated is `src`. We won't ever change that folder. - To even load a Typescript webpack config, `ts-node` needs to be installed.
Wrong translation keys will now cause a TS error. And most IDEs will be able to suggest keys when typing. As TS cannot load YAML directly, it needs a bit more setup code. And it required a few adjustments in the code.
LukasKalbertodt
force-pushed
the
more-frontend-checking
branch
from
March 6, 2023 18:11
e1d9be8
to
a27424b
Compare
owi92
approved these changes
Mar 8, 2023
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.
Looks good to me.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
See commits.