Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix <Iterate> render function parameter typing not inferring correctly #24

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

shtaif
Copy link
Owner

@shtaif shtaif commented Dec 30, 2024

Fix <Iterate>'s render function parameter type not inferred correctly when value prop is given a plain value, in which case it was still considering initialValue's type (or undefined on lack of it) as a possibility in the iteration result object's value (but that can't happen since we have a plain non-iterable value which it will render as-is immediately).

…tly in conjunction with `initialValue` semantics
@shtaif shtaif self-assigned this Dec 30, 2024
@shtaif shtaif marked this pull request as ready for review December 30, 2024 11:17
@shtaif shtaif merged commit fe45bbb into master Dec 30, 2024
6 checks passed
@shtaif shtaif deleted the fix-iterate-children-param-typing branch December 30, 2024 11:18
shtaif pushed a commit that referenced this pull request Jan 5, 2025
## [0.3.0](v0.2.0...v0.3.0) (2025-01-05)

### Features

* add a convenience alias export `<It>` for `<Iterate>` ([#19](#19)) ([679cb23](679cb23))
* add an exposed `MaybeAsyncIterable` helper generic type ([#25](#25)) ([dd06927](dd06927))
* make `useAsyncIterState` iterable's type more accurate ([#23](#23)) ([bd75364](bd75364))

### Bug Fixes

* `<Iterate>` render function parameter typing not inferring correctly in conjunction with `initialValue` with plain values semantics ([#24](#24)) ([fe45bbb](fe45bbb))
* make iterators of the `useAsyncIterState` hook's iterable individually closable to prevent leaving around unsettled promises ([#22](#22)) ([25e1ab5](25e1ab5))
* yielding consecutive identical values causes unnecessary re-renders for `useAsyncIter` and `<Iterate>` in misalignment with `React.useState` ([#21](#21)) ([2a35f72](2a35f72))

### Refactor

* fix import path of `iterateFormatted` on package's public export ([#17](#17)) ([f3481e6](f3481e6))
* various misc refactorings ([#26](#26)) ([20af9b0](20af9b0))

### Tests

* add tests for rapid yielding iterables value batching for `useAsyncIter` and `<Iterate>` ([#20](#20)) ([ebcbfd4](ebcbfd4))
Copy link

github-actions bot commented Jan 5, 2025

🎉 This PR is included in version 0.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant