-
Notifications
You must be signed in to change notification settings - Fork 672
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
Remove redundant Svg requires from components in docs #665
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for reselect-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 355da53:
|
descope bot
referenced
this pull request
in descope/descope-js
Mar 19, 2024
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [reselect](https://github.com/reduxjs/reselect) | dependencies | minor | [`5.0.1` -> `5.1.0`](https://renovatebot.com/diffs/npm/reselect/5.0.1/5.1.0) | --- ### Release Notes <details> <summary>reduxjs/reselect (reselect)</summary> ### [`v5.1.0`](https://github.com/reduxjs/reselect/releases/tag/v5.1.0) [Compare Source](https://github.com/reduxjs/reselect/compare/v5.0.1...v5.1.0) This **minor release**: - Adds a new `createSelector.withTypes<RootState>()` and `createStructuredSelector.withTypes<RootState>()` API - Deprecates the `TypedStructuredSelectorCreator` type introduced in 5.0 - Aims to reduce false positives in `identityFunctionCheck` by only running if the output selector is passed one argument - Fixes a bug with `weakMapMemoize`'s `resultEqualityCheck` when used with a primitive result. ##### `withTypes` Most commonly, selectors will accept the root state of a Redux store as their first argument. `withTypes` allows you to specify what that first argument will be ahead of creating the selector, meaning it doesn't have to be specified. ```ts // previously export const selectPostById = createSelector( [ (state: RootState) => state.posts.entities, (state: RootState, id: number) => id, ], (entities, id) => entities[id], ); // now export const createAppSelector = createSelector.withTypes<RootState>(); export const selectPostById = createAppSelector( [(state) => state.posts.entities, (state, id: number) => id], (entities, id) => entities[id], ); ``` ##### Known limitations Due to a Typescript issue, inference of the output selector's parameters only works with `withTypes` when using an array of input selectors. If using the variadic version, you can either wrap your input selectors in an array instance (as above), or annotate the parameters manually. ```ts export const createAppSelector = createSelector.withTypes<RootState>(); export const selectPostById = createAppSelector( (state) => state.posts.entities, (state, id: number) => id, // parameters cannot be inferred, so need annotating (entities: Record<number, Post>, id: number) => entities[id], ); ``` ##### What's Changed - Reduce `identityFunctionCheck` false positives by [@​Methuselah96](https://github.com/Methuselah96) in [https://github.com/reduxjs/reselect/pull/660](https://github.com/reduxjs/reselect/pull/660) - Fix cut content inside TOC of docs by [@​aryaemami59](https://github.com/aryaemami59) in [https://github.com/reduxjs/reselect/pull/664](https://github.com/reduxjs/reselect/pull/664) - Remove redundant Svg requires from components in docs by [@​aryaemami59](https://github.com/aryaemami59) in [https://github.com/reduxjs/reselect/pull/665](https://github.com/reduxjs/reselect/pull/665) - Fix `_lastResult.deref` is not a function (it is undefined) in React Native and Expo applications by [@​aryaemami59](https://github.com/aryaemami59) in [https://github.com/reduxjs/reselect/pull/671](https://github.com/reduxjs/reselect/pull/671) - Update getting-started.mdx by [@​cchaonie](https://github.com/cchaonie) in [https://github.com/reduxjs/reselect/pull/672](https://github.com/reduxjs/reselect/pull/672) - Update createSelectorCreator.mdx with correct defaults by [@​lukeapage](https://github.com/lukeapage) in [https://github.com/reduxjs/reselect/pull/674](https://github.com/reduxjs/reselect/pull/674) - Introduce pre-typed `createSelector` via `createSelector.withTypes<RootState>()` method by [@​aryaemami59](https://github.com/aryaemami59) in [https://github.com/reduxjs/reselect/pull/673](https://github.com/reduxjs/reselect/pull/673) - Bump RTK and React-Redux to latest versions by [@​aryaemami59](https://github.com/aryaemami59) in [https://github.com/reduxjs/reselect/pull/676](https://github.com/reduxjs/reselect/pull/676) - add publish job by [@​EskiMojo14](https://github.com/EskiMojo14) in [https://github.com/reduxjs/reselect/pull/677](https://github.com/reduxjs/reselect/pull/677) - Wrap up implementation of `TypedStructuredSelectorCreator` by [@​aryaemami59](https://github.com/aryaemami59) in [https://github.com/reduxjs/reselect/pull/667](https://github.com/reduxjs/reselect/pull/667) - Introduce pre-typed `createStructuredSelector` via `createStructuredSelector.ts.withTypes<RootState>()` method by [@​aryaemami59](https://github.com/aryaemami59) in [https://github.com/reduxjs/reselect/pull/678](https://github.com/reduxjs/reselect/pull/678) - Bump `vitest` to v1 by [@​aryaemami59](https://github.com/aryaemami59) in [https://github.com/reduxjs/reselect/pull/668](https://github.com/reduxjs/reselect/pull/668) ##### New Contributors - [@​Methuselah96](https://github.com/Methuselah96) made their first contribution in [https://github.com/reduxjs/reselect/pull/660](https://github.com/reduxjs/reselect/pull/660) - [@​cchaonie](https://github.com/cchaonie) made their first contribution in [https://github.com/reduxjs/reselect/pull/672](https://github.com/reduxjs/reselect/pull/672) **Full Changelog**: reduxjs/reselect@v5.0.1...v5.1.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, 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 [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE3MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: descope[bot] <descope[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR: