-
Notifications
You must be signed in to change notification settings - Fork 48
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
Hot Reloading TypeScript component triggers rendering of ancestor TypeScript components #66
Comments
Thanks for the report, and for submitting a repro ❤️ This issue slipped off my radar, apologies for that. I'll try to take a look some time this week. |
Just had a very quick look, one thing we discovered the other day was that the Don't have time to test right now. |
Thanks so much, seems like that does make it work! I honestly don't really understand the |
At the moment, this transformer uses babel as a secondary transpiler, so the only limitation is that the |
I should just make the transformer overwrite the |
Actually |
Hmmmm good point. I hadn't considered that. I know it's possible to use babel as a secondary transpilation step with ts-jest too, maybe I should encourage that. Otherwise, yes, the two-different-configs thing is easy enough to do. I'm going to leave this issue open to remind me to do something about this. |
Jest requires commonjs, not a ts-jest thing. |
@GeeWee can you explain a bit more about what you mean or provide an example repo? |
I mean that jest requires the transpiled code to be in the CommonJS module format - so in ts-jest we try to ensure that the module format is set to that as the standard, unless the user explicitly overrides it (because they're using babel to do it themselves eg) Did that make sense? |
I'm not sure that this is directly related to this transformer, but this is quite frankly the best documentation for working with React Native and TypeScript that I can find, so I'm hoping that it can either be fixed in the transformer directly or at least someone has some advice.
It seems like if you make a change to a TypeScript, .tsx component it triggers a render of any ancestors during hot reloading. If you make a change to a .js component, it won't do this -- even if the ancestors are .tsx components.
You can see an example of this here: https://github.com/ajcrites/TsHotReload
The text was updated successfully, but these errors were encountered: