-
-
Notifications
You must be signed in to change notification settings - Fork 617
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
refactor(vanilla): moved (un)mount guards into their respective functions. (suggestion) #2457
Conversation
…ions. (suggestion)
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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. |
Preview in LiveCodesLatest commit: dd90c4d
See documentations for usage instructions. |
Thanks for suggestion. |
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.
While I'm currently working on a new store implementation, this change to the current implementation looks good. Thanks.
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | Type | Update | |---|---|---|---|---|---|---|---| | [@biomejs/biome](https://biomejs.dev) ([source](https://togithub.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome)) | [`1.5.3` -> `1.6.3`](https://renovatebot.com/diffs/npm/@biomejs%2fbiome/1.5.3/1.6.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@biomejs%2fbiome/1.6.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@biomejs%2fbiome/1.6.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@biomejs%2fbiome/1.5.3/1.6.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@biomejs%2fbiome/1.5.3/1.6.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [@types/cytoscape](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cytoscape) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/cytoscape)) | [`3.19.16` -> `3.21.0`](https://renovatebot.com/diffs/npm/@types%2fcytoscape/3.19.16/3.21.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fcytoscape/3.21.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fcytoscape/3.21.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fcytoscape/3.19.16/3.21.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fcytoscape/3.19.16/3.21.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [@types/react](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react)) | [`18.2.68` -> `18.2.73`](https://renovatebot.com/diffs/npm/@types%2freact/18.2.68/18.2.73) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2freact/18.2.73?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2freact/18.2.73?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2freact/18.2.68/18.2.73?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2freact/18.2.68/18.2.73?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@types/react-dom](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom)) | [`18.2.22` -> `18.2.23`](https://renovatebot.com/diffs/npm/@types%2freact-dom/18.2.22/18.2.23) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2freact-dom/18.2.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2freact-dom/18.2.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2freact-dom/18.2.22/18.2.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2freact-dom/18.2.22/18.2.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [gradle](https://gradle.org) ([source](https://togithub.com/gradle/gradle)) | `8.6` -> `8.7` | [![age](https://developer.mend.io/api/mc/badges/age/gradle-version/gradle/8.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/gradle-version/gradle/8.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/gradle-version/gradle/8.6/8.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/gradle-version/gradle/8.6/8.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | minor | | gradle | `8.6.0-jdk11` -> `8.7.0-jdk11` | [![age](https://developer.mend.io/api/mc/badges/age/docker/gradle/8.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/docker/gradle/8.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/docker/gradle/8.6.0/8.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/docker/gradle/8.6.0/8.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | stage | minor | | [jotai](https://togithub.com/pmndrs/jotai) | [`2.7.1` -> `2.7.2`](https://renovatebot.com/diffs/npm/jotai/2.7.1/2.7.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/jotai/2.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/jotai/2.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/jotai/2.7.1/2.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/jotai/2.7.1/2.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [katex](https://katex.org) ([source](https://togithub.com/KaTeX/KaTeX)) | [`0.16.9` -> `0.16.10`](https://renovatebot.com/diffs/npm/katex/0.16.9/0.16.10) | [![age](https://developer.mend.io/api/mc/badges/age/npm/katex/0.16.10?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/katex/0.16.10?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/katex/0.16.9/0.16.10?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/katex/0.16.9/0.16.10?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [pnpm](https://pnpm.io) ([source](https://togithub.com/pnpm/pnpm)) | [`8.15.4` -> `8.15.5`](https://renovatebot.com/diffs/npm/pnpm/8.15.4/8.15.5) | [![age](https://developer.mend.io/api/mc/badges/age/npm/pnpm/8.15.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pnpm/8.15.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pnpm/8.15.4/8.15.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pnpm/8.15.4/8.15.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | packageManager | patch | | [tailwindcss](https://tailwindcss.com) ([source](https://togithub.com/tailwindlabs/tailwindcss)) | [`3.4.1` -> `3.4.3`](https://renovatebot.com/diffs/npm/tailwindcss/3.4.1/3.4.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/tailwindcss/3.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/tailwindcss/3.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/tailwindcss/3.4.1/3.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/tailwindcss/3.4.1/3.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom](https://togithub.com/JetBrains/kotlin-wrappers) | `1.0.0-pre.710` -> `1.0.0-pre.722` | [![age](https://developer.mend.io/api/mc/badges/age/maven/org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom/1.0.0-pre.722?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom/1.0.0-pre.722?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom/1.0.0-pre.710/1.0.0-pre.722?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom/1.0.0-pre.710/1.0.0-pre.722?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | --- ### Release Notes <details> <summary>biomejs/biome (@​biomejs/biome)</summary> ### [`v1.6.3`](https://togithub.com/biomejs/biome/blob/HEAD/CHANGELOG.md#163-2024-03-25) [Compare Source](https://togithub.com/biomejs/biome/compare/7669b334ecfb9580abe83bbf6141232805f0e4bd...23b5a73ac7ccd4920f13919aaa712b9364020e88) ##### Analyzer ##### CLI ##### Bug fixes - Fix configuration resolution. Biome is now able to correctly find the `biome.jsonc` configuration file when `--config-path` is explicitly set ([#​2164](https://togithub.com/biomejs/biome/issues/2164)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) - JavaScript/TypeScript files of different variants (`.ts`, `.js`, `.tsx`, `.jsx`) in a single workspace now have stable formatting behaviors when running the CLI command in paths of different nested levels or in different operating systems ([#​2080](https://togithub.com/biomejs/biome/issues/2080), [#​2109](https://togithub.com/biomejs/biome/issues/2109)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) ##### Configuration ##### Bug fixes - Complete the documentation and overrides support for options `formatter.lineEnding`, `[language].formatter.lineEnding`, `formatter.attributePosition` and `javascript.formatter.attributePosition`. Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) ##### Editors ##### Formatter ##### Bug fixes - Fix [#​2172](https://togithub.com/biomejs/biome/issues/2172) by breaking long object destructuring patterns. Contributed by [@​ah-yu](https://togithub.com/ah-yu) ##### JavaScript APIs ##### Linter ##### New features - Add rule [noEvolvingAny](https://biomejs.dev/linter/rules/no-evolving-any) to disallow variables from evolving into `any` type through reassignments. Contributed by [@​fujiyamaorange](https://togithub.com/fujiyamaorange) ##### LSP ##### Bug fixes - Quickfix action no longer autofixes lint rule errors on save when `linter` is disabled ([#​2161](https://togithub.com/biomejs/biome/issues/2161)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) - Range formatting for Astro/Svelte/Vue doesn't place code out of place, especially when formatting on paste is enabled. Contributed by [@​ematipico](https://togithub.com/ematipico) ##### Parser ### [`v1.6.2`](https://togithub.com/biomejs/biome/blob/HEAD/CHANGELOG.md#162-2024-03-22) [Compare Source](https://togithub.com/biomejs/biome/compare/4ed1cbe96bc9e6d7092e88dd0a54ff8ce78037e5...7669b334ecfb9580abe83bbf6141232805f0e4bd) ##### Analyzer ##### Bug fixes - The `noSuperWithoutExtends` rule now allows for calling `super()` in derived class constructors of class expressions ([#​2108](https://togithub.com/biomejs/biome/issues/2108)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) - Fix discrepancies on file source detection. Allow module syntax in `.cts` files ([#​2114](https://togithub.com/biomejs/biome/issues/2114)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) ##### CLI ##### Bug fixes - Fixes [#​2131](https://togithub.com/biomejs/biome/issues/2131), where folders were incorrectly ignored when running the command `check`. Now folders are correctly ignored based on their command. Contributed by [@​ematipico](https://togithub.com/ematipico) - Smoother handling of `"endOfLine": "auto"` in prettier migration: falling back to `"lf"` ([#​2145](https://togithub.com/biomejs/biome/pull/2145)). Contributed by [@​eMerzh](https://togithub.com/eMerzh) ##### Configuration ##### Bug fixes - Fix enabled rules calculation. The precendence of individual rules, `all` and `recommend` presets in top-level and group-level configs is now correctly respected. More details can be seen in ([#​2072](https://togithub.com/biomejs/biome/pull/2072)) ([#​2028](https://togithub.com/biomejs/biome/issues/2028)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) ##### Formatter ##### Bug fixes - Fix [#​1661](https://togithub.com/biomejs/biome/issues/1661). Now nested conditionals are aligned with Prettier's logic, and won't contain mixed spaces and tabs. Contributed by [@​ematipico](https://togithub.com/ematipico) ##### JavaScript APIs ##### Enhancements - Support applying lint fixes when calling the `lintContent` method of the `Biome` class ([#​1956](https://togithub.com/biomejs/biome/pull/1956)). Contributed by [@​mnahkies](https://togithub.com/mnahkies) ##### Linter ##### Bug fixes - Rule `noUndeclaredDependencies` now also validates `peerDependencies` and `optionalDependencies` ([#​2122](https://togithub.com/biomejs/biome/issues/2122)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) - Rule `noUndeclaredDependencies` won't check `declare module` statements anymore ([#​2123](https://togithub.com/biomejs/biome/issues/2123)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) - Fix [#​1925](https://togithub.com/biomejs/biome/issues/1925). The fix for `useOptionalChain` would sometimes suggest an incorrect fix that discarded optional chaining operators on the left-hand side of logical expressions. These are now preserved. Contributed by [@​arendjr](https://togithub.com/arendjr) - Rule `noUndeclaredVariables` now also checks for worker globals ([#​2121](https://togithub.com/biomejs/biome/issues/2121)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) ##### LSP ##### Bug fixes - Correctly parse `.jsonc` files. Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) - Correctly resolve external `extends` configs. Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) ### [`v1.6.1`](https://togithub.com/biomejs/biome/blob/HEAD/CHANGELOG.md#161-2024-03-12) [Compare Source](https://togithub.com/biomejs/biome/compare/560628b380b0b1f61303c8e5ca2175d3b4794089...4ed1cbe96bc9e6d7092e88dd0a54ff8ce78037e5) ##### CLI ##### Bug fixes - CLI is now able to automatically search and resolve `biome.jsonc` ([#​2008](https://togithub.com/biomejs/biome/issues/2008)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) - Fix a false positive where some files were counted as "fixed" even though they weren't modified. Contributed by [@​ematipico](https://togithub.com/ematipico) ##### Configuration ##### Bug fixes - `json.formatter.trailingCommas` option now works in `overrides` ([#​2009](https://togithub.com/biomejs/biome/issues/2009)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) ##### Linter ##### New features - Add rule [noDoneCallback](https://biomejs.dev/linter/rules/no-done-callback), this rule checks the function parameter of hooks & tests for use of the done argument, suggesting you return a promise instead. Contributed by [@​vasucp1207](https://togithub.com/vasucp1207) ```js beforeEach(done => { // ... }); ``` ##### Bug fixes - [useJsxKeyInIterable](https://biomejs.dev/linter/rules/use-jsx-key-in-iterable) now recognizes function bodies wrapped in parentheses ([#​2011](https://togithub.com/biomejs/biome/issues/2011)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) - [useShorthandFunctionType](https://biomejs.dev/linter/rules/use-shorthand-function-type) now preserves type parameters of generic interfaces when applying fixes ([#​2015](https://togithub.com/biomejs/biome/issues/2015)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) - Code fixes of [useImportType](https://biomejs.dev/linter/rules/use-import-type) and [useExportType](https://biomejs.dev/linter/rules/use-export-type) now handle multiline statements ([#​2041](https://togithub.com/biomejs/biome/issues/2041)). Contributed by [@​Conaclos](https://togithub.com/Conaclos) - [noRedeclare](https://biomejs.dev/linter/rules/no-redeclare) no longer reports type parameter and parameter with identical names ([#​1992](https://togithub.com/biomejs/biome/issues/1992)). The following code is no longer reported: ```ts function f<a>(a: a) {} ``` Contributed by [@​Conaclos](https://togithub.com/Conaclos) - [noRedeclare](https://biomejs.dev/linter/rules/no-redeclare) now reports duplicate type parameters in a same declaration. The following type parameters are now reported as a redeclaraion: ```ts function f<T, T>() {} ``` Contributed by [@​Conaclos](https://togithub.com/Conaclos) - [noUndeclaredDependencies](https://biomejs.dev/linter/rules/no-undeclared-dependencies/) now recognizes imports of subpath exports. E.g., the following import statements no longer report errors if `@mui/material` and `tailwindcss` are installed as dependencies: ```ts import Button from "@​mui/material/Button"; import { fontFamily } from "tailwindcss/defaultTheme"; ``` Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) ##### Parser ##### Bug fixes - JavaScript lexer is now able to lex regular expression literals with escaped non-ascii chars ([#​1941](https://togithub.com/biomejs/biome/issues/1941)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) ### [`v1.6.0`](https://togithub.com/biomejs/biome/blob/HEAD/CHANGELOG.md#160-2024-03-08) [Compare Source](https://togithub.com/biomejs/biome/compare/906de83449b5066554cd8e97c78a1f8e43749016...560628b380b0b1f61303c8e5ca2175d3b4794089) ##### Analyzer ##### New features - Add partial for `.astro` files. Biome is able to sort imports inside the frontmatter of the Astro files. Contributed by [@​ematipico](https://togithub.com/ematipico) </details> <details> <summary>gradle/gradle (gradle)</summary> ### [`v8.7`](https://togithub.com/gradle/gradle/compare/v8.6.0...v8.7.0) [Compare Source](https://togithub.com/gradle/gradle/compare/v8.6.0...v8.7.0) </details> <details> <summary>pmndrs/jotai (jotai)</summary> ### [`v2.7.2`](https://togithub.com/pmndrs/jotai/releases/tag/v2.7.2) [Compare Source](https://togithub.com/pmndrs/jotai/compare/v2.7.1...v2.7.2) Mostly refactors. #### What's Changed - refactor(vanilla): moved (un)mount guards into their respective functions. (suggestion) by [@​iwoplaza](https://togithub.com/iwoplaza) in [https://github.com/pmndrs/jotai/pull/2457](https://togithub.com/pmndrs/jotai/pull/2457) - fix(vanilla): improve dual instance warning in DEV by [@​dai-shi](https://togithub.com/dai-shi) in [https://github.com/pmndrs/jotai/pull/2462](https://togithub.com/pmndrs/jotai/pull/2462) - refactor: no-any by [@​dai-shi](https://togithub.com/dai-shi) in [https://github.com/pmndrs/jotai/pull/2471](https://togithub.com/pmndrs/jotai/pull/2471) - fix: avoid slow types by [@​dai-shi](https://togithub.com/dai-shi) in [https://github.com/pmndrs/jotai/pull/2472](https://togithub.com/pmndrs/jotai/pull/2472) **Full Changelog**: pmndrs/jotai@v2.7.1...v2.7.2 </details> <details> <summary>KaTeX/KaTeX (katex)</summary> ### [`v0.16.10`](https://togithub.com/KaTeX/KaTeX/blob/HEAD/CHANGELOG.md#01610-2024-03-24) [Compare Source](https://togithub.com/KaTeX/KaTeX/compare/v0.16.9...v0.16.10) ##### Bug Fixes - \edef bypassing maxExpand via exponential blowup ([e88b4c3](https://togithub.com/KaTeX/KaTeX/commit/e88b4c357f978b1bca8edfe3297f0aa309bcbe34)) - escape \includegraphics src and alt ([c5897fc](https://togithub.com/KaTeX/KaTeX/commit/c5897fcd1f73da9612a53e6b5544f1d776e17770)) - force protocol to be lowercase for better protocol filtering ([fc5af64](https://togithub.com/KaTeX/KaTeX/commit/fc5af64183a3ceb9be9d1c23a275999a728593de)), closes [/datatracker.ietf.org/doc/html/rfc3986#section-3](https://togithub.com//datatracker.ietf.org/doc/html/rfc3986/issues/section-3) - maxExpand limit with Unicode sub/superscripts ([085e21b](https://togithub.com/KaTeX/KaTeX/commit/085e21b5da05414efefa932570e7201a7c70e5b2)) </details> <details> <summary>pnpm/pnpm (pnpm)</summary> ### [`v8.15.5`](https://togithub.com/pnpm/pnpm/compare/v8.15.4...v8.15.5) [Compare Source](https://togithub.com/pnpm/pnpm/compare/v8.15.4...v8.15.5) </details> <details> <summary>tailwindlabs/tailwindcss (tailwindcss)</summary> ### [`v3.4.3`](https://togithub.com/tailwindlabs/tailwindcss/compare/v3.4.2...f1f419a9ecfcd00a2001ee96ab252739fca47564) [Compare Source](https://togithub.com/tailwindlabs/tailwindcss/compare/v3.4.2...v3.4.3) ### [`v3.4.2`](https://togithub.com/tailwindlabs/tailwindcss/releases/tag/v3.4.2) [Compare Source](https://togithub.com/tailwindlabs/tailwindcss/compare/v3.4.1...v3.4.2) ##### Fixed - Ensure max specificity of `0,0,1` for button and input Preflight rules ([#​12735](https://togithub.com/tailwindlabs/tailwindcss/pull/12735)) - Improve glob handling for folders with `(`, `)`, `[` or `]` in the file path ([#​12715](https://togithub.com/tailwindlabs/tailwindcss/pull/12715)) - Split `:has` rules when using `experimental.optimizeUniversalDefaults` ([#​12736](https://togithub.com/tailwindlabs/tailwindcss/pull/12736)) - Sort arbitrary properties alphabetically across multiple class lists ([#​12911](https://togithub.com/tailwindlabs/tailwindcss/pull/12911)) - Add `mix-blend-plus-darker` utility ([#​12923](https://togithub.com/tailwindlabs/tailwindcss/pull/12923)) - Ensure dashes are allowed in variant modifiers ([#​13303](https://togithub.com/tailwindlabs/tailwindcss/pull/13303)) - Fix crash showing completions in Intellisense when using a custom separator ([#​13306](https://togithub.com/tailwindlabs/tailwindcss/pull/13306)) - Transpile `import.meta.url` in config files ([#​13322](https://togithub.com/tailwindlabs/tailwindcss/pull/13322)) - Reset letter spacing for form elements ([#​13150](https://togithub.com/tailwindlabs/tailwindcss/pull/13150)) - Fix missing `xx-large` and remove double `x-large` absolute size ([#​13324](https://togithub.com/tailwindlabs/tailwindcss/pull/13324)) - Don't error when encountering nested CSS unless trying to `@apply` a class that uses nesting ([#​13325](https://togithub.com/tailwindlabs/tailwindcss/pull/13325)) - Ensure that arbitrary properties respect `important` configuration ([#​13353](https://togithub.com/tailwindlabs/tailwindcss/pull/13353)) - Change dark mode selector so `@apply` works correctly with pseudo elements ([#​13379](https://togithub.com/tailwindlabs/tailwindcss/pull/13379)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 1pm and before 5pm on Friday" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- 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/turtton/volglass). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
In my pursuit to understand the store implementation better, I found a few places where the code seems redundant (either because the check fails/succeeds before, likely unreachable, or the code is handling an undefined case even though the function is only called when the value is defined).
Changes:
canUnmountAtom
was being called at every call site ofunmountAtom
, so to reduce the risk of unmounting an atom prematurely at some call site by mistake, I moved the check into the function.unmountAtom
totryUnmountAtom
to better reflect the new behaviorcanUnmountAtom
closer to the call site (tryUnmountAtom
) to increase code legibility.mountAtom
idempotent for already mounted atoms, which removed most "is this already mounted" checks.mountDependencies
after checking if the dependent atom is already mounted.addAtom
anddelAtom
, since without the checks, they were just wrappers formountAtom
andtryUnmountAtom
.Let me know what you think about these changes! 💚 🐸
Check List
yarn run prettier
for formatting code and docs