Skip to content
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: Fix input reactivity in useResource$() tutorial #5818

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

alexcsandru
Copy link
Contributor

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests / types / typos

Description

Restored dynamic input reactivity in the useResource$() tutorial by updating the onInput$ handler to properly reflect changes. Previously, updates to the github.org input did not refresh repository data due to static value assignment, preventing the expected reactive behavior.

Checklist:

  • My code follows the developer guidelines of this project
  • [] I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • Added new tests to cover the fix / functionality

Restored dynamic input reactivity in the `useResource$()` tutorial by updating the `onInput$` handler to properly reflect changes. Previously, updates to the `github.org` input did not refresh repository data due to static value assignment, preventing the expected reactive behavior.
Copy link

netlify bot commented Feb 5, 2024

👷 Deploy request for qwik-insights pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 98d9c7b

<input
value={github.org}
onInput$={(ev) =>
(github.org = (ev.target as HTMLInputElement).value)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason it wasn't working is because github.org wasn't being assigned in onInput$.

However, in your fix you're no longer using the invoking element, which is the correct way to read input events. Please fix this so we can merge.

Copy link
Member

@wmertens wmertens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix as indicated and run pnpm fmt to fix the lint error

@alexcsandru
Copy link
Contributor Author

Thanks @wmertens - I believe now it's everything ok 🤞

Copy link
Member

@wmertens wmertens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wmertens wmertens enabled auto-merge (squash) February 5, 2024 12:05
@wmertens wmertens merged commit 35fbb40 into QwikDev:main Feb 5, 2024
22 checks passed
kodiakhq bot pushed a commit to ascorbic/unpic-img that referenced this pull request Feb 11, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@builder.io/qwik](https://qwik.builder.io/) ([source](https://togithub.com/BuilderIO/qwik/tree/HEAD/packages/qwik)) | [`1.4.3` -> `1.4.4`](https://renovatebot.com/diffs/npm/@builder.io%2fqwik/1.4.3/1.4.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@builder.io%2fqwik/1.4.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@builder.io%2fqwik/1.4.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@builder.io%2fqwik/1.4.3/1.4.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@builder.io%2fqwik/1.4.3/1.4.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>BuilderIO/qwik (@&#8203;builder.io/qwik)</summary>

### [`v1.4.4`](https://togithub.com/BuilderIO/qwik/releases/tag/v1.4.4)

[Compare Source](https://togithub.com/BuilderIO/qwik/compare/v1.4.3...v1.4.4)

#### What's Changed

-   feat(vite): make linting op-out by [@&#8203;wmertens](https://togithub.com/wmertens) in [QwikDev/qwik#5801
-   fix(core): assign refs without reactivity during SSR by [@&#8203;wmertens](https://togithub.com/wmertens) in [QwikDev/qwik#5802
-   fix(docs): correct minor typos by [@&#8203;kylerush](https://togithub.com/kylerush) in [QwikDev/qwik#5804
-   chore(starters): update 🐼 PandaCSS integration starter dev dependency by [@&#8203;mrhoodz](https://togithub.com/mrhoodz) in [QwikDev/qwik#5806
-   fix(scoped styles): [@&#8203;container](https://togithub.com/container) block by [@&#8203;wmertens](https://togithub.com/wmertens) in [QwikDev/qwik#5813
-   chore: ci e2e: single worker and longer timeout by [@&#8203;wmertens](https://togithub.com/wmertens) in [QwikDev/qwik#5814
-   fix(link): Prefetch redirects to error pages. Fixes [#&#8203;5474](https://togithub.com/BuilderIO/qwik/issues/5474) by [@&#8203;iamriajul](https://togithub.com/iamriajul) in [QwikDev/qwik#5817
-   chore: publish qwik-react with types by [@&#8203;wmertens](https://togithub.com/wmertens) in [QwikDev/qwik#5819
-   fix: Fix input reactivity in `useResource$()` tutorial by [@&#8203;alexcsandru](https://togithub.com/alexcsandru) in [QwikDev/qwik#5818
-   docs: fix qwik-nutshell example by [@&#8203;ozanmakes](https://togithub.com/ozanmakes) in [QwikDev/qwik#5824
-   chore(starters): update 🐼 PandaCSS integration starter dev dependency by [@&#8203;mrhoodz](https://togithub.com/mrhoodz) in [QwikDev/qwik#5825
-   chore: 1.4.4 by [@&#8203;wmertens](https://togithub.com/wmertens) in [QwikDev/qwik#5828

#### New Contributors

-   [@&#8203;kylerush](https://togithub.com/kylerush) made their first contribution in [QwikDev/qwik#5804
-   [@&#8203;alexcsandru](https://togithub.com/alexcsandru) made their first contribution in [QwikDev/qwik#5818
-   [@&#8203;ozanmakes](https://togithub.com/ozanmakes) made their first contribution in [QwikDev/qwik#5824

**Full Changelog**: QwikDev/qwik@v1.4.3...v1.4.4

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 9pm on sunday" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/ascorbic/unpic-img).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE3My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants