-
Notifications
You must be signed in to change notification settings - Fork 977
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
fix[gen2-sdks]: add keys for Fragment inside Accordion JSX loop #3725
Conversation
🦋 Changeset detectedLatest commit: 3310c98 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 27f6e9b. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution
Sent with 💌 from NxCloud. |
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
9508867 | Triggered | Generic High Entropy Secret | cca4410 | packages/react/src/blocks/Video.tsx | View secret |
314150 | Triggered | Generic High Entropy Secret | cca4410 | packages/react/src/blocks/Video.tsx | View secret |
14200383 | Triggered | Generic High Entropy Secret | cca4410 | packages/core/src/builder.class.test.ts | View secret |
14200385 | Triggered | Generic High Entropy Secret | cca4410 | packages/core/src/builder.class.test.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
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.
Thanks a lot for this helpful contribution 🙏🏽
## Description Identical to #3725. For some reason, the other PR isn't running CI test jobs properly, so I'm making a new PR --------- Co-authored-by: Óscar Carrasco <[email protected]>
Description
This PR adds the
key
attribute inside the Accordion component. This attribute is required by React's use of loops in JSX code, and will throw an error when the top-level children in a loop are missing this attribute.From the TypeScript handbook on
JSX.IntrinsicAttributes
:Additional concerns
Although this is more a situation exclusively about Mitosis, I wanted to, at least, mention it here.
I'd argue that the
key
attribute, being intrinsic to React's use of JSX, should be managed accordingly inside Mitosis heuristics in order to avoid polluting the Mitosis JSX markup with references to specific transpiler back-ends. Moreover, how could we do the same we're doing in this commit if we were to use Sveltosis instead?For this reason, I want to propose considering this a temporary fix and solve the problem in the right context, which would be Mitosis handling of key attributes in loops.