-
Notifications
You must be signed in to change notification settings - Fork 60
@react.component props record in externals not automatically marked as live #994
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
Comments
Fixes rescript-lang/rescript-vscode#994 Dead code elimination in the editor tooling complains about props never being read in the `props` type record defined by the V4 ppx. This is because externals don't provide the implementation of the component, and it's in the implementation that props could be read. This OR marks the `props` type definition as `@live` for external components, so the dead code analysis does not fire.
Fixes rescript-lang/rescript-vscode#994 Dead code elimination in the editor tooling complains about props never being read in the `props` type record defined by the V4 ppx. This is because externals don't provide the implementation of the component, and it's in the implementation that props could be read. This OR marks the `props` type definition as `@live` for external components, so the dead code analysis does not fire.
This warning is legit, as the PPX V4 code generated for externals never reads the fields in the prop type: using it with children only amounts to creating a new record |
* PPX v4: mark props type in externals as `@live`. Fixes rescript-lang/rescript-vscode#994 Dead code elimination in the editor tooling complains about props never being read in the `props` type record defined by the V4 ppx. This is because externals don't provide the implementation of the component, and it's in the implementation that props could be read. This OR marks the `props` type definition as `@live` for external components, so the dead code analysis does not fire. * Update CHANGELOG.md
* PPX v4: mark props type in externals as `@live`. Fixes rescript-lang/rescript-vscode#994 Dead code elimination in the editor tooling complains about props never being read in the `props` type record defined by the V4 ppx. This is because externals don't provide the implementation of the component, and it's in the implementation that props could be read. This OR marks the `props` type definition as `@live` for external components, so the dead code analysis does not fire. * Update CHANGELOG.md
* PPX v4: mark props type in externals as `@live`. Fixes rescript-lang/rescript-vscode#994 Dead code elimination in the editor tooling complains about props never being read in the `props` type record defined by the V4 ppx. This is because externals don't provide the implementation of the component, and it's in the implementation that props could be read. This OR marks the `props` type definition as `@live` for external components, so the dead code analysis does not fire. * Update CHANGELOG.md
* PPX v4: mark props type in externals as `@live`. Fixes rescript-lang/rescript-vscode#994 Dead code elimination in the editor tooling complains about props never being read in the `props` type record defined by the V4 ppx. This is because externals don't provide the implementation of the component, and it's in the implementation that props could be read. This OR marks the `props` type definition as `@live` for external components, so the dead code analysis does not fire. * Update CHANGELOG.md
* PPX v4: mark props type in externals as `@live`. Fixes rescript-lang/rescript-vscode#994 Dead code elimination in the editor tooling complains about props never being read in the `props` type record defined by the V4 ppx. This is because externals don't provide the implementation of the component, and it's in the implementation that props could be read. This OR marks the `props` type definition as `@live` for external components, so the dead code analysis does not fire. * Update CHANGELOG.md
Uh oh!
There was an error while loading. Please reload this page.
Bind an external component:
Use it with children:
It's still reported as:
But I assume it should be automatically marked as live because it's sent into an external.
The text was updated successfully, but these errors were encountered: