From 91321e23839d472c9f9f132a5814957b9935919b Mon Sep 17 00:00:00 2001 From: BANO Date: Sun, 7 Jan 2024 00:51:30 +0300 Subject: [PATCH 1/2] docs: fix some broken links --- README.md | 28 +++++++++---------- docs/src/content/docs/compat/react-v1.md | 2 +- .../content/docs/getting-started/debugging.md | 2 +- docs/src/content/docs/index.md | 28 +++++++++---------- docs/src/content/docs/package/async.md | 4 +-- docs/src/content/docs/package/core.md | 6 ++-- docs/src/content/docs/package/form.md | 2 +- docs/src/content/docs/package/framework.md | 2 +- docs/src/content/docs/package/hooks.md | 6 ++-- docs/src/content/docs/package/lens.md | 2 +- docs/src/content/docs/package/npm-react.md | 2 +- docs/src/content/docs/package/npm-solid-js.md | 2 +- docs/src/content/docs/package/undo.md | 2 +- .../content/docs/recipes/custom-operator.md | 2 +- packages/async/README.md | 4 +-- packages/core/README.md | 6 ++-- packages/form/README.md | 2 +- packages/framework/README.md | 2 +- packages/hooks/README.md | 6 ++-- packages/lens/README.md | 2 +- packages/npm-react/README.md | 2 +- packages/npm-solid-js/README.md | 2 +- packages/react-v1/README.md | 2 +- packages/undo/README.md | 2 +- 24 files changed, 60 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index f3a17fa3f..e01e6f2ff 100644 --- a/README.md +++ b/README.md @@ -5,21 +5,21 @@ - **simple** and powerful abstractions. There are only three main primitives: `ctx`, `atom`, `action`, all other features and packages works on top of that. - **immutable** and reliable. - All pure computations processed with [atomicity](https://www.reatom.dev/general/what-is-state-manager#state) guaranties. + All pure computations processed with atomicity guaranties. - **explicit reactivity** without proxies. - To archive [maximum](#how-performant-reatom-is) performance we have [atomization](https://www.reatom.dev/guides/atomization) pattern. + To archive [maximum](#how-performant-reatom-is) performance we have [atomization](https://www.reatom.dev/recipes/atomization) pattern. - perfect **effects management**. Advanced [async package](https://www.reatom.dev/package/async) allows you to describe complex async flows with caching, retrying and automatic cancellation with native `await` and `AbortController`. - nice **debugging** experience. - Each atom and action update stores [immutable cause (call) stack](https://www.reatom.dev/guides/debug) which is super helpful for debugging complex async flows. To simplify this we have [logger package](https://www.reatom.dev/package/logger). + Each atom and action update stores [immutable cause (call) stack](https://www.reatom.dev/getting-started/debugging/) which is super helpful for debugging complex async flows. To simplify this we have [logger package](https://www.reatom.dev/package/logger). - implicit **DI**. To run tests and SSR 100% safety you need an isolation layer, which `ctx` is! We have the extra [testing package](https://www.reatom.dev/package/testing) with pack of helpers for a mocking. - actor-like **lifecycle hooks** - To archive a trhtully modularity you have ability to describe [self-sufficient models](https://www.reatom.dev/guides/lifecycle) + To archive a trhtully modularity you have ability to describe [self-sufficient models](https://www.reatom.dev/handbook#lifecycle) - **smallest bundle** size: [2 KB](https://bundlejs.com/?q=%40reatom%2Fcore) gzipped Because of the power of the base primitives all ecosystem with A LOT of enterprize-grade helpers took only [~15KB](https://bundlejs.com/?q=%40reatom%2Fframework%2C%40reatom%2Fnpm-react%2C%40reatom%2Fpersist-web-storage%2C%40reatom%2Fundo%2C%40reatom%2Fform-web&config=%7B%22esbuild%22%3A%7B%22external%22%3A%5B%22react%22%2C%22use-sync-external-store%22%5D%7D%7D) - insane! - **best TypeScript** experience - [Automatic type inference](https://www.reatom.dev/guides/typescript) is one of the main priority of Reatom developement. + [Automatic type inference](https://www.reatom.dev/recipes/typescript/) is one of the main priority of Reatom developement. [The core package](https://www.reatom.dev/core) includes most these features and you may use it anywhere, from huge apps to even small libs, as the overhead is tiny. Also, you could reuse our carefully written [helper tools](https://www.reatom.dev/package/framework) to solve complex tasks in a couple lines of code. We are trying to build a stable and balanced ecosystem for perfect DX and predictable maintains even for years ahead. @@ -96,7 +96,7 @@ document.getElementById('save').addEventListener('click', () => { Check out [@reatom/core docs](https://www.reatom.dev/core) for detailed explanation of key principles and features. -Do you use React.js? Check out [npm-react](https://www.reatom.dev/adapter/npm-react) package! +Do you use React.js? Check out [npm-react](https://www.reatom.dev/package/npm-react) package! ## Advanced example @@ -190,13 +190,13 @@ export const Search = () => { The whole logic definition is only about 15 LoC and it is not coupled to React and could be tested easily. What would the lines count be in a different library? The most impressive thing is that the overhead is [less than 4KB (gzip)](https://bundlejs.com/?q=%28import%29%40reatom%2Fframework%2C%28import%29%40reatom%2Fnpm-react&treeshake=%5B%7B%0A++atom%2CcreateCtx%2ConUpdate%2CreatomAsync%2Csleep%2CwithAbort%2CwithDataAtom%2CwithRetry%2C%7D%5D%2C%5B%7B+useAtom+%7D%5D&share=MYewdgzgLgBBCmBDATsAFgQSiAtjAvDItjgBQBE5ANDOQiulruQJQDcAUKJLAGbxR0ASQgQArvAgEYyJCQwQAnmGClESlTFLAoADxoBHCckUAuOFGQBLMAHMWBAHwwA3hxhEA7oiuwIAG3h4AAdSACYAVgAGdhgAejiYABN4ACMQMRV4dxhuaFcYX3gcKQBfaURvXyJgqwA6fkE0EXFJUiN4ExodXTruSxB-QOR2HNkoMWQwQqhiiE5SmnJG4VEJCFY62uD4UhzPXzQAEWJEJjIAbQBdFip9w4x05ChSFwtkYnhbM1p-dSgALQ2AEHMDkGClW73KBoABKAhMrxyHnA8IAVvAdNo9DROsgQMhzIgwIoaONrJIHG4PDT4olxpNpik-opCtMSjACTAAQBGGDYGDBWQAN3gYFg5KskmRNIZUxgeIJAH46jhJBBELZ4HUbMB-GIUhAKB9ZjB-FYcL5WDLaUqYDyolEYAAqGAAWWIaFVNlI0SiZIRUqkztdYRYNpp5l5nFpixykLuowSMkyMBWzTWkk503gopMcCQqEwJBgYmCSU%2BHHAAFVy59SPQi%2BcaOmWutRlxZJ8AMJ6UijMQIc6kVuZiB1CtQM4kFhAA&config=%7B%22esbuild%22%3A%7B%22external%22%3A%5B%22react%22%2C%22use-sync-external-store%22%5D%7D%7D) could you imagine?! And you are not limited to network cache, Reatom is powerful and expressive enough for describing any kind of state. -To get maximum of Reatom and the ecosystem just go to [tutorial](https://www.reatom.dev/tutorial). If you need something tiny - check out [the core package docs](https://www.reatom.dev/core). Also, we have a [package for testing](https://www.reatom.dev/package/testing)! +To get maximum of Reatom and the ecosystem just go to [tutorial](https://www.reatom.dev/getting-started/setup/). If you need something tiny - check out [the core package docs](https://www.reatom.dev/core). Also, we have a [package for testing](https://www.reatom.dev/package/testing)! ## Roadmap - Finish [forms package](https://www.reatom.dev/package/form) -- Finish ~~[persist](https://www.reatom.dev/package/persist)~~ and [navigation](https://github.com/artalar/reatom/tree/v3/packages/navigation)~~ (improve [url](https://www.reatom.dev/package/url/)) packages -- Add adapters for most popular ui frameworks: ~~[react](https://www.reatom.dev/adapter/npm-react)~~, angular, vue, ~~[svelte](https://www.reatom.dev/adapter/npm-svelte)~~, ~~[solid](https://www.reatom.dev/adapter/npm-solid-js/)~~. +- Finish ~~[persist](https://www.reatom.dev/package/persist)~~, improve [url](https://www.reatom.dev/package/url/) packages +- Add adapters for most popular ui frameworks: ~~[react](https://www.reatom.dev/package/npm-react)~~, angular, vue, ~~[svelte](https://www.reatom.dev/package/npm-svelte)~~, ~~[solid](https://www.reatom.dev/package/npm-solid-js/)~~. - Port some components logic from reakit.io, to made it fast, light and portable. - Add ability to made async transaction and elaborate optimistic-ui patterns and helpers / package. @@ -204,18 +204,18 @@ To get maximum of Reatom and the ecosystem just go to [tutorial](https://www.rea ### Why not X? -**Redux** is awesome and Reatom is heavy inspired by it. Immutability, separation of computations and effects are good architecture designs principles. But there are a lot of missing features, when you trying to build something huge, or want to describe something small. Some of them is just impossible to fix, like [batching](https://www.reatom.dev/core#ctxget-batch-api), [O(n) complexity](https://www.reatom.dev/guides/atomization#reducing-computational-complexity) or that selectors is not inspectable and breaks [the atomicy](https://www.reatom.dev/general/what-is-state-manager#state). Others is really [hard to improve](https://github.com/reduxjs/reselect/discussions/491). And boilerplate, yeah, [the difference is a huge](https://github.com/artalar/RTK-entities-basic-example/pull/1/files#diff-43162f68100a9b5eb2e58684c7b9a5dc7b004ba28fd8a4eb6461402ec3a3a6c6). +**Redux** is awesome and Reatom is heavy inspired by it. Immutability, separation of computations and effects are good architecture designs principles. But there are a lot of missing features, when you trying to build something huge, or want to describe something small. Some of them is just impossible to fix, like [batching](https://www.reatom.dev/core#ctxget-batch-api), [O(n) complexity](https://www.reatom.dev/recipes/atomization/#reducing-computational-complexity) or that selectors is not inspectable and breaks [the atomicy](https://www.reatom.dev/general/what-is-state-manager#state). Others is really [hard to improve](https://github.com/reduxjs/reselect/discussions/491). And boilerplate, yeah, [the difference is a huge](https://github.com/artalar/RTK-entities-basic-example/pull/1/files#diff-43162f68100a9b5eb2e58684c7b9a5dc7b004ba28fd8a4eb6461402ec3a3a6c6). Reatom solves all this problems and bring much more features by the almost same size. **MobX** brings too big bundle to use it in a small widgets, Reatom is more universal in this case. Also, MobX has mutability and implicit reactivity, which is usefull for simple cases, but could be not obvious and hard to debug in complex cases. There is no separate thing like action / event / effect to describe some dependent effects sequences (FRP-way). [There is not atomicy too](https://github.com/artalar/state-management-specification/blob/master/src/index.test.js#L60). -**Effector** is too opinionated. There is **no** first-class support for **lazy** reactive computations and all connections are [hot](https://luukgruijs.medium.com/understanding-hot-vs-cold-observables-62d04cf92e03) everytime, which is could be more predictable, but defenetly is not optimal. Effector is not friendly for fabric creation (because of it hotness), which disallow us to use [atomization](https://www.reatom.dev/guides/atomization#ref-pattern) patterns, needed to handle immutability efficient. [The bundle size is 2-3 times larger](https://bundlejs.com/?q=effector&treeshake=%5B%7BcraeteStore%2CcreateEvent%2Ccombine%7D%5D) and [performance is lower](https://github.com/artalar/reactive-computed-bench). +**Effector** is too opinionated. There is **no** first-class support for **lazy** reactive computations and all connections are [hot](https://luukgruijs.medium.com/understanding-hot-vs-cold-observables-62d04cf92e03) everytime, which is could be more predictable, but defenetly is not optimal. Effector is not friendly for fabric creation (because of it hotness), which disallow us to use [atomization](https://www.reatom.dev/recipes/atomization/) patterns, needed to handle immutability efficient. [The bundle size is 2-3 times larger](https://bundlejs.com/?q=effector&treeshake=%5B%7BcraeteStore%2CcreateEvent%2Ccombine%7D%5D) and [performance is lower](https://github.com/artalar/reactive-computed-bench). [Zustand](https://github.com/pmndrs/zustand), [nanostores](https://github.com/nanostores/nanostores), [xstate](https://xstate.js.org) and [many other](https://gist.github.com/artalar/e5e8a7274dfdfbe9d36c9e5ec22fc650) state managers have no so great combination of type inference, features, bundle size and performance, as Reatom have. ### Why immutability? -Immutable data is much predictable and better for debug, than mutable states and wrapers around that. Reatom specialy designed with focus on [simple debug of async chains](https://www.reatom.dev/guides/debug) and [have a patterns](https://www.reatom.dev/guides/atomization) to handle [greate performance](#how-performant-reatom-is). +Immutable data is much predictable and better for debug, than mutable states and wrapers around that. Reatom specialy designed with focus on [simple debug of async chains](https://www.reatom.dev/getting-started/debugging/) and [have a patterns](https://www.reatom.dev/recipes/atomization/) to handle [greate performance](#how-performant-reatom-is). ### What LTS policy is used and what about bus factor? @@ -233,13 +233,13 @@ All builds have two types of output formats: CJS (`exports.require`, `main`) and [Here is the benchmark](https://github.com/artalar/reactive-computed-bench) of complex computations for different state managers. Note that Reatom by default uses immutable data structures, works in a separate context (DI-like) and keeps [atomicity](https://www.reatom.dev/general/what-is-state-manager#state), which means the Reatom test checks more features, than other state manager tests. Anyway, for the middle numbers Reatom faster than MobX which is pretty impressive. -Also, check out [atomization guide](https://www.reatom.dev/guides/atomization). +Also, check out [atomization guide](https://www.reatom.dev/recipes/atomization). ### Limitations Of course there are no software without limitations. Reatom is trying to be a silver bullet but we still have some cases which you should know about. -- Immutable data always have an additional performance impact and in critical cases you should think well about your structures and how you could handle it better. The good news is that you [don't have to use normalization](https://www.reatom.dev/guides/atomization). +- Immutable data always have an additional performance impact and in critical cases you should think well about your structures and how you could handle it better. The good news is that you [don't have to use normalization](https://www.reatom.dev/recipes/atomization). - Laziness could be not obvious in some cases and will cause some updates missing. But it easy to debug a missing update, which is more explicit, than memory leaks and performance issues of hot observables. Anyway, we have [hooks](https://www.reatom.dev/package/hooks) for hot linking. - Currently, there is no way to subscribe on error of any dependency, but we are working on it. In [reatomAsync](https://www.reatom.dev/package/async) passed effects wraps to an error handler and allow you to handle errors, but again - you should wrap it explicit. - Currently, there is no asynchronous transactions support, but we are working on it. It is important feature for simplify building of optimistic UI and we really think it will improve UX a lot. diff --git a/docs/src/content/docs/compat/react-v1.md b/docs/src/content/docs/compat/react-v1.md index beece756a..8589e6cd0 100644 --- a/docs/src/content/docs/compat/react-v1.md +++ b/docs/src/content/docs/compat/react-v1.md @@ -9,7 +9,7 @@ description: Reatom for react-v1 -This is compatible package which allow you to use `@reatom/core-v1` with react. All docs is [here](/adapter/npm-react/). +This is compatible package which allow you to use `@reatom/core-v1` with react. All docs is [here](/package/npm-react/). ## Setup batching for old React diff --git a/docs/src/content/docs/getting-started/debugging.md b/docs/src/content/docs/getting-started/debugging.md index fc138542a..ae0261fad 100644 --- a/docs/src/content/docs/getting-started/debugging.md +++ b/docs/src/content/docs/getting-started/debugging.md @@ -26,7 +26,7 @@ const ctx = createCtx() connectLogger(ctx) ``` -More settings you can found in [@reatom/logger](@reatom/logger) documentation +More settings you can found in [@reatom/logger](https://www.reatom.dev/package/logger) documentation ## Usage diff --git a/docs/src/content/docs/index.md b/docs/src/content/docs/index.md index 7824d6b45..1ce0210f4 100644 --- a/docs/src/content/docs/index.md +++ b/docs/src/content/docs/index.md @@ -14,21 +14,21 @@ description: Reatom - tiny and powerful reactive system with immutable nature - **simple** and powerful abstractions. There are only three main primitives: `ctx`, `atom`, `action`, all other features and packages works on top of that. - **immutable** and reliable. - All pure computations processed with [atomicity](/general/what-is-state-manager#state) guaranties. + All pure computations processed with atomicity guaranties. - **explicit reactivity** without proxies. - To archive [maximum](#how-performant-reatom-is) performance we have [atomization](/guides/atomization) pattern. + To archive [maximum](#how-performant-reatom-is) performance we have [atomization](/recipes/atomization) pattern. - perfect **effects management**. Advanced [async package](/package/async) allows you to describe complex async flows with caching, retrying and automatic cancellation with native `await` and `AbortController`. - nice **debugging** experience. - Each atom and action update stores [immutable cause (call) stack](/guides/debug) which is super helpful for debugging complex async flows. To simplify this we have [logger package](/package/logger). + Each atom and action update stores [immutable cause (call) stack](/getting-started/debugging/) which is super helpful for debugging complex async flows. To simplify this we have [logger package](/package/logger). - implicit **DI**. To run tests and SSR 100% safety you need an isolation layer, which `ctx` is! We have the extra [testing package](/package/testing) with pack of helpers for a mocking. - actor-like **lifecycle hooks** - To archive a trhtully modularity you have ability to describe [self-sufficient models](/guides/lifecycle) + To archive a trhtully modularity you have ability to describe [self-sufficient models](/handbook#lifecycle) - **smallest bundle** size: [2 KB](https://bundlejs.com/?q=%40reatom%2Fcore) gzipped Because of the power of the base primitives all ecosystem with A LOT of enterprize-grade helpers took only [~15KB](https://bundlejs.com/?q=%40reatom%2Fframework%2C%40reatom%2Fnpm-react%2C%40reatom%2Fpersist-web-storage%2C%40reatom%2Fundo%2C%40reatom%2Fform-web&config=%7B%22esbuild%22%3A%7B%22external%22%3A%5B%22react%22%2C%22use-sync-external-store%22%5D%7D%7D) - insane! - **best TypeScript** experience - [Automatic type inference](/guides/typescript) is one of the main priority of Reatom developement. + [Automatic type inference](/recipes/typescript/) is one of the main priority of Reatom developement. [The core package](/core) includes most these features and you may use it anywhere, from huge apps to even small libs, as the overhead is tiny. Also, you could reuse our carefully written [helper tools](/package/framework) to solve complex tasks in a couple lines of code. We are trying to build a stable and balanced ecosystem for perfect DX and predictable maintains even for years ahead. @@ -105,7 +105,7 @@ document.getElementById('save').addEventListener('click', () => { Check out [@reatom/core docs](/core) for detailed explanation of key principles and features. -Do you use React.js? Check out [npm-react](/adapter/npm-react) package! +Do you use React.js? Check out [npm-react](/package/npm-react) package! ## Advanced example @@ -199,13 +199,13 @@ export const Search = () => { The whole logic definition is only about 15 LoC and it is not coupled to React and could be tested easily. What would the lines count be in a different library? The most impressive thing is that the overhead is [less than 4KB (gzip)](https://bundlejs.com/?q=%28import%29%40reatom%2Fframework%2C%28import%29%40reatom%2Fnpm-react&treeshake=%5B%7B%0A++atom%2CcreateCtx%2ConUpdate%2CreatomAsync%2Csleep%2CwithAbort%2CwithDataAtom%2CwithRetry%2C%7D%5D%2C%5B%7B+useAtom+%7D%5D&share=MYewdgzgLgBBCmBDATsAFgQSiAtjAvDItjgBQBE5ANDOQiulruQJQDcAUKJLAGbxR0ASQgQArvAgEYyJCQwQAnmGClESlTFLAoADxoBHCckUAuOFGQBLMAHMWBAHwwA3hxhEA7oiuwIAG3h4AAdSACYAVgAGdhgAejiYABN4ACMQMRV4dxhuaFcYX3gcKQBfaURvXyJgqwA6fkE0EXFJUiN4ExodXTruSxB-QOR2HNkoMWQwQqhiiE5SmnJG4VEJCFY62uD4UhzPXzQAEWJEJjIAbQBdFip9w4x05ChSFwtkYnhbM1p-dSgALQ2AEHMDkGClW73KBoABKAhMrxyHnA8IAVvAdNo9DROsgQMhzIgwIoaONrJIHG4PDT4olxpNpik-opCtMSjACTAAQBGGDYGDBWQAN3gYFg5KskmRNIZUxgeIJAH46jhJBBELZ4HUbMB-GIUhAKB9ZjB-FYcL5WDLaUqYDyolEYAAqGAAWWIaFVNlI0SiZIRUqkztdYRYNpp5l5nFpixykLuowSMkyMBWzTWkk503gopMcCQqEwJBgYmCSU%2BHHAAFVy59SPQi%2BcaOmWutRlxZJ8AMJ6UijMQIc6kVuZiB1CtQM4kFhAA&config=%7B%22esbuild%22%3A%7B%22external%22%3A%5B%22react%22%2C%22use-sync-external-store%22%5D%7D%7D) could you imagine?! And you are not limited to network cache, Reatom is powerful and expressive enough for describing any kind of state. -To get maximum of Reatom and the ecosystem just go to [tutorial](/tutorial). If you need something tiny - check out [the core package docs](/core). Also, we have a [package for testing](/package/testing)! +To get maximum of Reatom and the ecosystem just go to [tutorial](/getting-started/setup/). If you need something tiny - check out [the core package docs](/core). Also, we have a [package for testing](/package/testing)! ## Roadmap - Finish [forms package](/package/form) -- Finish ~~[persist](/package/persist)~~ and [navigation](https://github.com/artalar/reatom/tree/v3/packages/navigation)~~ (improve [url](/package/url/)) packages -- Add adapters for most popular ui frameworks: ~~[react](/adapter/npm-react)~~, angular, vue, ~~[svelte](/adapter/npm-svelte)~~, ~~[solid](/adapter/npm-solid-js/)~~. +- Finish ~~[persist](/package/persist)~~, improve [url](/package/url/) packages +- Add adapters for most popular ui frameworks: ~~[react](/package/npm-react)~~, angular, vue, ~~[svelte](/package/npm-svelte)~~, ~~[solid](/package/npm-solid-js/)~~. - Port some components logic from reakit.io, to made it fast, light and portable. - Add ability to made async transaction and elaborate optimistic-ui patterns and helpers / package. @@ -213,18 +213,18 @@ To get maximum of Reatom and the ecosystem just go to [tutorial](/tutorial). If ### Why not X? -**Redux** is awesome and Reatom is heavy inspired by it. Immutability, separation of computations and effects are good architecture designs principles. But there are a lot of missing features, when you trying to build something huge, or want to describe something small. Some of them is just impossible to fix, like [batching](/core#ctxget-batch-api), [O(n) complexity](/guides/atomization#reducing-computational-complexity) or that selectors is not inspectable and breaks [the atomicy](/general/what-is-state-manager#state). Others is really [hard to improve](https://github.com/reduxjs/reselect/discussions/491). And boilerplate, yeah, [the difference is a huge](https://github.com/artalar/RTK-entities-basic-example/pull/1/files#diff-43162f68100a9b5eb2e58684c7b9a5dc7b004ba28fd8a4eb6461402ec3a3a6c6). +**Redux** is awesome and Reatom is heavy inspired by it. Immutability, separation of computations and effects are good architecture designs principles. But there are a lot of missing features, when you trying to build something huge, or want to describe something small. Some of them is just impossible to fix, like [batching](/core#ctxget-batch-api), [O(n) complexity](/recipes/atomization/#reducing-computational-complexity) or that selectors is not inspectable and breaks [the atomicy](/general/what-is-state-manager#state). Others is really [hard to improve](https://github.com/reduxjs/reselect/discussions/491). And boilerplate, yeah, [the difference is a huge](https://github.com/artalar/RTK-entities-basic-example/pull/1/files#diff-43162f68100a9b5eb2e58684c7b9a5dc7b004ba28fd8a4eb6461402ec3a3a6c6). Reatom solves all this problems and bring much more features by the almost same size. **MobX** brings too big bundle to use it in a small widgets, Reatom is more universal in this case. Also, MobX has mutability and implicit reactivity, which is usefull for simple cases, but could be not obvious and hard to debug in complex cases. There is no separate thing like action / event / effect to describe some dependent effects sequences (FRP-way). [There is not atomicy too](https://github.com/artalar/state-management-specification/blob/master/src/index.test.js#L60). -**Effector** is too opinionated. There is **no** first-class support for **lazy** reactive computations and all connections are [hot](https://luukgruijs.medium.com/understanding-hot-vs-cold-observables-62d04cf92e03) everytime, which is could be more predictable, but defenetly is not optimal. Effector is not friendly for fabric creation (because of it hotness), which disallow us to use [atomization](/guides/atomization#ref-pattern) patterns, needed to handle immutability efficient. [The bundle size is 2-3 times larger](https://bundlejs.com/?q=effector&treeshake=%5B%7BcraeteStore%2CcreateEvent%2Ccombine%7D%5D) and [performance is lower](https://github.com/artalar/reactive-computed-bench). +**Effector** is too opinionated. There is **no** first-class support for **lazy** reactive computations and all connections are [hot](https://luukgruijs.medium.com/understanding-hot-vs-cold-observables-62d04cf92e03) everytime, which is could be more predictable, but defenetly is not optimal. Effector is not friendly for fabric creation (because of it hotness), which disallow us to use [atomization](/recipes/atomization/) patterns, needed to handle immutability efficient. [The bundle size is 2-3 times larger](https://bundlejs.com/?q=effector&treeshake=%5B%7BcraeteStore%2CcreateEvent%2Ccombine%7D%5D) and [performance is lower](https://github.com/artalar/reactive-computed-bench). [Zustand](https://github.com/pmndrs/zustand), [nanostores](https://github.com/nanostores/nanostores), [xstate](https://xstate.js.org) and [many other](https://gist.github.com/artalar/e5e8a7274dfdfbe9d36c9e5ec22fc650) state managers have no so great combination of type inference, features, bundle size and performance, as Reatom have. ### Why immutability? -Immutable data is much predictable and better for debug, than mutable states and wrapers around that. Reatom specialy designed with focus on [simple debug of async chains](/guides/debug) and [have a patterns](/guides/atomization) to handle [greate performance](#how-performant-reatom-is). +Immutable data is much predictable and better for debug, than mutable states and wrapers around that. Reatom specialy designed with focus on [simple debug of async chains](/getting-started/debugging/) and [have a patterns](/recipes/atomization/) to handle [greate performance](#how-performant-reatom-is). ### What LTS policy is used and what about bus factor? @@ -242,13 +242,13 @@ All builds have two types of output formats: CJS (`exports.require`, `main`) and [Here is the benchmark](https://github.com/artalar/reactive-computed-bench) of complex computations for different state managers. Note that Reatom by default uses immutable data structures, works in a separate context (DI-like) and keeps [atomicity](/general/what-is-state-manager#state), which means the Reatom test checks more features, than other state manager tests. Anyway, for the middle numbers Reatom faster than MobX which is pretty impressive. -Also, check out [atomization guide](/guides/atomization). +Also, check out [atomization guide](/recipes/atomization). ### Limitations Of course there are no software without limitations. Reatom is trying to be a silver bullet but we still have some cases which you should know about. -- Immutable data always have an additional performance impact and in critical cases you should think well about your structures and how you could handle it better. The good news is that you [don't have to use normalization](/guides/atomization). +- Immutable data always have an additional performance impact and in critical cases you should think well about your structures and how you could handle it better. The good news is that you [don't have to use normalization](/recipes/atomization). - Laziness could be not obvious in some cases and will cause some updates missing. But it easy to debug a missing update, which is more explicit, than memory leaks and performance issues of hot observables. Anyway, we have [hooks](/package/hooks) for hot linking. - Currently, there is no way to subscribe on error of any dependency, but we are working on it. In [reatomAsync](/package/async) passed effects wraps to an error handler and allow you to handle errors, but again - you should wrap it explicit. - Currently, there is no asynchronous transactions support, but we are working on it. It is important feature for simplify building of optimistic UI and we really think it will improve UX a lot. diff --git a/docs/src/content/docs/package/async.md b/docs/src/content/docs/package/async.md index f64c71ac9..c4a61394b 100644 --- a/docs/src/content/docs/package/async.md +++ b/docs/src/content/docs/package/async.md @@ -231,7 +231,7 @@ export const fetchList = reatomAsync( onConnect(fetchList.dataAtom, fetchList) ``` -What this code do? When you connect to `fetchList.dataAtom` it will automatically call `fetchList` action. Connection could appear in any place of your application, by `ctx.subscribe(fetchList.dataAtom, cb)` or by using `useAtom(fetchList.dataAtom)` hook from [@reatom/npm-react](/adapter/npm-react). Even by a different atom. +What this code do? When you connect to `fetchList.dataAtom` it will automatically call `fetchList` action. Connection could appear in any place of your application, by `ctx.subscribe(fetchList.dataAtom, cb)` or by using `useAtom(fetchList.dataAtom)` hook from [@reatom/npm-react](/package/npm-react). Even by a different atom. ```ts export const filteredListAtom = atom( @@ -727,7 +727,7 @@ const listResource = reatomResource(async (ctx) => { That's all. The code becomes much cleaner and simpler! The only additional change is the need for `ctx.schedule` for effects, as the callback in the `reatomResource` is called in the pure computations queue (to make `spy` work). -Also, `listResource` now has a `promiseAtom` that contains the last promise. You can use it with [useAtomPromise](/adapter/npm-react/#useatompromise) in a React application, for example. +Also, `listResource` now has a `promiseAtom` that contains the last promise. You can use it with [useAtomPromise](/package/npm-react/#useatompromise) in a React application, for example. If you need to set up a default value and use it synchronously, simply use `withDataAtom` as you would with any other async action. All async operators work fine with `reatomResource`. You could use `withRetry` and even `withCache`! diff --git a/docs/src/content/docs/package/core.md b/docs/src/content/docs/package/core.md index 48b10e9c7..2212871a1 100644 --- a/docs/src/content/docs/package/core.md +++ b/docs/src/content/docs/package/core.md @@ -123,7 +123,7 @@ document.getElementById('search-input').addEventListener('input', (event) => { }) ``` -> Do you want to see [the docs for React adapter](/adapter/npm-react) next? +> Do you want to see [the docs for React adapter](/package/npm-react) next? ### Action handling (advanced) @@ -288,7 +288,7 @@ const countAtom = withInit(() => localStorage.getItem('COUNT') ?? 0)(atom(0)) > `withInit` allows you to configure the initial state of the atom reading, which is sometimes more predictable and safer for testing. -Operator `with` prefix mean that the target atom will be changed somehow and the returned reference will the same. [reatom/async](/package/async) uses operators a lot to configure the behavior of the effect by composition, which is good for tree-shaking. Check naming conventions and more examples in [this guide](/guides/naming#operator-prefix) +Operator `with` prefix mean that the target atom will be changed somehow and the returned reference will the same. [reatom/async](/package/async) uses operators a lot to configure the behavior of the effect by composition, which is good for tree-shaking. Check naming conventions and more examples in [this guide](/recipes/custom-operator/) Btw, actions has `pipe` too! @@ -434,7 +434,7 @@ A unique feature of Reatom, especially in scheduling, is ability to define the t - `1` - the **default** near effect queue, used to schedule regular effects. The calling of these effects can be redefined (or delayed) using the `callNearEffect` option of `createCtx`. - `2` - lates effect queue, used to schedule subscribers. The calling of these effects can be redefined (or delayed) using the `callLateEffect` option of `createCtx`. -> Read more in the [lifecycle guild](/guides/lifecycle). +> Read more in the [lifecycle guild](/handbook#lifecycle). #### `ctx.schedule` rollback API diff --git a/docs/src/content/docs/package/form.md b/docs/src/content/docs/package/form.md index c3d96202c..bd79eba2a 100644 --- a/docs/src/content/docs/package/form.md +++ b/docs/src/content/docs/package/form.md @@ -13,7 +13,7 @@ This is a general form library with a simple focus and validation management. The form API is designed for the best type-safety and flexibility. Instead of setting up the form state with a single object, each field is created separately, giving you the ability to fine-tune each field perfectly. As the field and its meta statuses are stored in atoms, you can easily combine them, define hooks, and effects to describe any logic you need. -The cherry on the cake is dynamic field management. You don't need to use weird string APIs like `form.${index}.property`. Instead, you can simply have a list of atom fields using [atomization](/guides/atomization/). +The cherry on the cake is dynamic field management. You don't need to use weird string APIs like `form.${index}.property`. Instead, you can simply have a list of atom fields using [atomization](/recipes/atomization/). ## Installation diff --git a/docs/src/content/docs/package/framework.md b/docs/src/content/docs/package/framework.md index dc65d2a43..d5be90cc2 100644 --- a/docs/src/content/docs/package/framework.md +++ b/docs/src/content/docs/package/framework.md @@ -9,7 +9,7 @@ description: Reatom for framework This is a meta package which aggregates general Reatom packages for better handling async logic and models coupling. This package helps to reduce imports boilerplate and simplify dependencies management. -Docs around this package and it combination usage you could find in the [tutorial](/tutorial). +Docs around this package and it combination usage you could find in the [tutorial](/getting-started/setup/). Included packages: diff --git a/docs/src/content/docs/package/hooks.md b/docs/src/content/docs/package/hooks.md index 00748bf15..cb124c3fd 100644 --- a/docs/src/content/docs/package/hooks.md +++ b/docs/src/content/docs/package/hooks.md @@ -11,7 +11,7 @@ description: Reatom for hooks All atoms and actions have a hooks to they lifecycle, this package exposes friendly helpers to use this hooks. -We assumes that you already read [lifecycle guide](/guides/lifecycle). +We assumes that you already read [lifecycle guide](/handbook#lifecycle). A lot of cool examples you could find in [async package docs](/package/async). @@ -21,7 +21,7 @@ A lot of cool examples you could find in [async package docs](/package/async). All connection (and disconnection) callbacks calling during effects queue - outside batching. The returned value is a dispose function used to deactivate the hook. -"Connection" refers to the presence of any number of subscribers in the atom. The first subscriber activates the connection status, while the second subscriber does not interact with it. Unsubscribing the first subscriber has no effect since there is still one subscriber (the second one). However, after unsubscribing the second subscriber, the connection status will be deactivated, and if a cleanup callback is provided, it will be triggered. You can read more in the [lifecycle guide](/guides/lifecycle/). +"Connection" refers to the presence of any number of subscribers in the atom. The first subscriber activates the connection status, while the second subscriber does not interact with it. Unsubscribing the first subscriber has no effect since there is still one subscriber (the second one). However, after unsubscribing the second subscriber, the connection status will be deactivated, and if a cleanup callback is provided, it will be triggered. You can read more in the [lifecycle guide](/handbook#lifecycle). ```ts import { atom } from '@reatom/core' @@ -113,7 +113,7 @@ export const doSome = action((ctx, payload) => { The `onUpdate` hook allows you to react to state updates of the passed atom. However, **this hook will be deprecated in the future**. It is recommended and more convenient to use the atom's `onChange` method and the action's `onCall` method. You can find more information about these methods in the [core package documentation](/core/#atomonchange-api). -For general computed atoms (via `ctx.spy`), it is only called when the atom is connected. You can read more in the [lifecycle guide](/guides/lifecycle/). +For general computed atoms (via `ctx.spy`), it is only called when the atom is connected. You can read more in the [lifecycle guide](/handbook#lifecycle). One unique feature of `onUpdate` is that it could activate the entire chain of dependent atoms **if they are `LensAtom` or `LensAction`** from the [lens package](/package/lens/). It useful when you want to delay or sample the reaction. diff --git a/docs/src/content/docs/package/lens.md b/docs/src/content/docs/package/lens.md index 158fc4849..86943acf5 100644 --- a/docs/src/content/docs/package/lens.md +++ b/docs/src/content/docs/package/lens.md @@ -195,7 +195,7 @@ export const countAtom = _countAtom.pipe(readonly) ## `parseAtoms` -Recursively unwrap all atoms in an [atomized](/guides/atomization) structure. Useful for making snapshots of reactive state. Uses `ctx.spy` if it's available. +Recursively unwrap all atoms in an [atomized](/recipes/atomization) structure. Useful for making snapshots of reactive state. Uses `ctx.spy` if it's available. ### `parseAtoms`: persistence example diff --git a/docs/src/content/docs/package/npm-react.md b/docs/src/content/docs/package/npm-react.md index dd94f9f41..e17a8a19b 100644 --- a/docs/src/content/docs/package/npm-react.md +++ b/docs/src/content/docs/package/npm-react.md @@ -239,7 +239,7 @@ return ( ## Use update -`useUpdate` is a similar to `useEffect` hook, but it allows you to subscribe to atoms and receive it values in the callback. Important semantic difference is that subscription to atoms works as [`onChange` hook](/guides/lifecycle) and your callback will call during transaction, so you need to schedule an effects, but could mutate an atoms without batching. Subscriptions to a values works like regular `useEffect` hook. +`useUpdate` is a similar to `useEffect` hook, but it allows you to subscribe to atoms and receive it values in the callback. Important semantic difference is that subscription to atoms works as [`onChange` hook](/handbook#lifecycle) and your callback will call during transaction, so you need to schedule an effects, but could mutate an atoms without batching. Subscriptions to a values works like regular `useEffect` hook. The most common use case for this hook is to synchronize some state from a props or context to an atom. diff --git a/docs/src/content/docs/package/npm-solid-js.md b/docs/src/content/docs/package/npm-solid-js.md index adcba9bb5..0836830e4 100644 --- a/docs/src/content/docs/package/npm-solid-js.md +++ b/docs/src/content/docs/package/npm-solid-js.md @@ -95,6 +95,6 @@ If you need to get the `ctx` from the context, you could use the shortcut hook ` ### Dynamic atom creation -This example shoes how to use [atomization](/guides/atomization) to improve editable fields performance, persists it to localStorage. +This example shoes how to use [atomization](/recipes/atomization) to improve editable fields performance, persists it to localStorage. https://stackblitz.com/edit/reatomnpm-solid-js-mssqxj?file=src/model.ts,src/App.tsx diff --git a/docs/src/content/docs/package/undo.md b/docs/src/content/docs/package/undo.md index 99901f1e6..5ef390a0a 100644 --- a/docs/src/content/docs/package/undo.md +++ b/docs/src/content/docs/package/undo.md @@ -87,7 +87,7 @@ const formUndoAtom = reatomUndo([emailAtom, passwordAtom], { length: 50 }) ### reatomDynamicUndo -`reatomDynamicUndo` accepts a callback to spy a dynamic list of atoms and manage their changes in a single history line. It is useful when you want to use [atomization pattern](/guides/atomization/). It is a more powerful version of `reatomUndo`, but it requires proper subscription to function correctly. Also, the state of this atom is not useful, do not read it. +`reatomDynamicUndo` accepts a callback to spy a dynamic list of atoms and manage their changes in a single history line. It is useful when you want to use [atomization pattern](/recipes/atomization/). It is a more powerful version of `reatomUndo`, but it requires proper subscription to function correctly. Also, the state of this atom is not useful, do not read it. The second argument accepts all `withUndo` options. diff --git a/docs/src/content/docs/recipes/custom-operator.md b/docs/src/content/docs/recipes/custom-operator.md index 6dae6cad2..56ff6162d 100644 --- a/docs/src/content/docs/recipes/custom-operator.md +++ b/docs/src/content/docs/recipes/custom-operator.md @@ -5,7 +5,7 @@ description: How to create custom operators to improve your code and modularize All atoms and actions by default includes [pipe operator](/core#atompipe-api) for simple extending and composing. You can create your own operators to improve your code and modularize it. -We assume that you already read [core](/core) docs and [naming conventions](/guides/naming). +We assume that you already read [core](/core) docs. ## Prefix and types diff --git a/packages/async/README.md b/packages/async/README.md index df4015868..ebd93142a 100644 --- a/packages/async/README.md +++ b/packages/async/README.md @@ -222,7 +222,7 @@ export const fetchList = reatomAsync( onConnect(fetchList.dataAtom, fetchList) ``` -What this code do? When you connect to `fetchList.dataAtom` it will automatically call `fetchList` action. Connection could appear in any place of your application, by `ctx.subscribe(fetchList.dataAtom, cb)` or by using `useAtom(fetchList.dataAtom)` hook from [@reatom/npm-react](https://www.reatom.dev/adapter/npm-react). Even by a different atom. +What this code do? When you connect to `fetchList.dataAtom` it will automatically call `fetchList` action. Connection could appear in any place of your application, by `ctx.subscribe(fetchList.dataAtom, cb)` or by using `useAtom(fetchList.dataAtom)` hook from [@reatom/npm-react](https://www.reatom.dev/package/npm-react). Even by a different atom. ```ts export const filteredListAtom = atom( @@ -718,7 +718,7 @@ const listResource = reatomResource(async (ctx) => { That's all. The code becomes much cleaner and simpler! The only additional change is the need for `ctx.schedule` for effects, as the callback in the `reatomResource` is called in the pure computations queue (to make `spy` work). -Also, `listResource` now has a `promiseAtom` that contains the last promise. You can use it with [useAtomPromise](https://www.reatom.dev/adapter/npm-react/#useatompromise) in a React application, for example. +Also, `listResource` now has a `promiseAtom` that contains the last promise. You can use it with [useAtomPromise](https://www.reatom.dev/package/npm-react/#useatompromise) in a React application, for example. If you need to set up a default value and use it synchronously, simply use `withDataAtom` as you would with any other async action. All async operators work fine with `reatomResource`. You could use `withRetry` and even `withCache`! diff --git a/packages/core/README.md b/packages/core/README.md index 790a8a334..d9cf020d2 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -114,7 +114,7 @@ document.getElementById('search-input').addEventListener('input', (event) => { }) ``` -> Do you want to see [the docs for React adapter](https://www.reatom.dev/adapter/npm-react) next? +> Do you want to see [the docs for React adapter](https://www.reatom.dev/package/npm-react) next? ### Action handling (advanced) @@ -279,7 +279,7 @@ const countAtom = withInit(() => localStorage.getItem('COUNT') ?? 0)(atom(0)) > `withInit` allows you to configure the initial state of the atom reading, which is sometimes more predictable and safer for testing. -Operator `with` prefix mean that the target atom will be changed somehow and the returned reference will the same. [reatom/async](https://www.reatom.dev/package/async) uses operators a lot to configure the behavior of the effect by composition, which is good for tree-shaking. Check naming conventions and more examples in [this guide](https://www.reatom.dev/guides/naming#operator-prefix) +Operator `with` prefix mean that the target atom will be changed somehow and the returned reference will the same. [reatom/async](https://www.reatom.dev/package/async) uses operators a lot to configure the behavior of the effect by composition, which is good for tree-shaking. Check naming conventions and more examples in [this guide](https://www.reatom.dev/recipes/custom-operator/) Btw, actions has `pipe` too! @@ -425,7 +425,7 @@ A unique feature of Reatom, especially in scheduling, is ability to define the t - `1` - the **default** near effect queue, used to schedule regular effects. The calling of these effects can be redefined (or delayed) using the `callNearEffect` option of `createCtx`. - `2` - lates effect queue, used to schedule subscribers. The calling of these effects can be redefined (or delayed) using the `callLateEffect` option of `createCtx`. -> Read more in the [lifecycle guild](https://www.reatom.dev/guides/lifecycle). +> Read more in the [lifecycle guild](https://www.reatom.dev/handbook#lifecycle). #### `ctx.schedule` rollback API diff --git a/packages/form/README.md b/packages/form/README.md index 9dbecc8d0..cf2174a85 100644 --- a/packages/form/README.md +++ b/packages/form/README.md @@ -4,7 +4,7 @@ This is a general form library with a simple focus and validation management. The form API is designed for the best type-safety and flexibility. Instead of setting up the form state with a single object, each field is created separately, giving you the ability to fine-tune each field perfectly. As the field and its meta statuses are stored in atoms, you can easily combine them, define hooks, and effects to describe any logic you need. -The cherry on the cake is dynamic field management. You don't need to use weird string APIs like `form.${index}.property`. Instead, you can simply have a list of atom fields using [atomization](https://www.reatom.dev/guides/atomization/). +The cherry on the cake is dynamic field management. You don't need to use weird string APIs like `form.${index}.property`. Instead, you can simply have a list of atom fields using [atomization](https://www.reatom.dev/recipes/atomization/). ## Installation diff --git a/packages/framework/README.md b/packages/framework/README.md index 33fcdb432..186aabdf4 100644 --- a/packages/framework/README.md +++ b/packages/framework/README.md @@ -1,6 +1,6 @@ This is a meta package which aggregates general Reatom packages for better handling async logic and models coupling. This package helps to reduce imports boilerplate and simplify dependencies management. -Docs around this package and it combination usage you could find in the [tutorial](https://www.reatom.dev/tutorial). +Docs around this package and it combination usage you could find in the [tutorial](https://www.reatom.dev/getting-started/setup/). Included packages: diff --git a/packages/hooks/README.md b/packages/hooks/README.md index 0ff249e13..eacffe237 100644 --- a/packages/hooks/README.md +++ b/packages/hooks/README.md @@ -2,7 +2,7 @@ All atoms and actions have a hooks to they lifecycle, this package exposes friendly helpers to use this hooks. -We assumes that you already read [lifecycle guide](https://www.reatom.dev/guides/lifecycle). +We assumes that you already read [lifecycle guide](https://www.reatom.dev/handbook#lifecycle). A lot of cool examples you could find in [async package docs](https://www.reatom.dev/package/async). @@ -12,7 +12,7 @@ A lot of cool examples you could find in [async package docs](https://www.reatom All connection (and disconnection) callbacks calling during effects queue - outside batching. The returned value is a dispose function used to deactivate the hook. -"Connection" refers to the presence of any number of subscribers in the atom. The first subscriber activates the connection status, while the second subscriber does not interact with it. Unsubscribing the first subscriber has no effect since there is still one subscriber (the second one). However, after unsubscribing the second subscriber, the connection status will be deactivated, and if a cleanup callback is provided, it will be triggered. You can read more in the [lifecycle guide](https://www.reatom.dev/guides/lifecycle/). +"Connection" refers to the presence of any number of subscribers in the atom. The first subscriber activates the connection status, while the second subscriber does not interact with it. Unsubscribing the first subscriber has no effect since there is still one subscriber (the second one). However, after unsubscribing the second subscriber, the connection status will be deactivated, and if a cleanup callback is provided, it will be triggered. You can read more in the [lifecycle guide](https://www.reatom.dev/handbook#lifecycle). ```ts import { atom } from '@reatom/core' @@ -104,7 +104,7 @@ export const doSome = action((ctx, payload) => { The `onUpdate` hook allows you to react to state updates of the passed atom. However, **this hook will be deprecated in the future**. It is recommended and more convenient to use the atom's `onChange` method and the action's `onCall` method. You can find more information about these methods in the [core package documentation](https://www.reatom.dev/core/#atomonchange-api). -For general computed atoms (via `ctx.spy`), it is only called when the atom is connected. You can read more in the [lifecycle guide](https://www.reatom.dev/guides/lifecycle/). +For general computed atoms (via `ctx.spy`), it is only called when the atom is connected. You can read more in the [lifecycle guide](https://www.reatom.dev/handbook#lifecycle). One unique feature of `onUpdate` is that it could activate the entire chain of dependent atoms **if they are `LensAtom` or `LensAction`** from the [lens package](https://www.reatom.dev/package/lens/). It useful when you want to delay or sample the reaction. diff --git a/packages/lens/README.md b/packages/lens/README.md index 562a6f2d4..363b0df7e 100644 --- a/packages/lens/README.md +++ b/packages/lens/README.md @@ -186,7 +186,7 @@ export const countAtom = _countAtom.pipe(readonly) ## `parseAtoms` -Recursively unwrap all atoms in an [atomized](https://www.reatom.dev/guides/atomization) structure. Useful for making snapshots of reactive state. Uses `ctx.spy` if it's available. +Recursively unwrap all atoms in an [atomized](https://www.reatom.dev/recipes/atomization) structure. Useful for making snapshots of reactive state. Uses `ctx.spy` if it's available. ### `parseAtoms`: persistence example diff --git a/packages/npm-react/README.md b/packages/npm-react/README.md index d4df3b822..0e98f8493 100644 --- a/packages/npm-react/README.md +++ b/packages/npm-react/README.md @@ -230,7 +230,7 @@ return ( ## Use update -`useUpdate` is a similar to `useEffect` hook, but it allows you to subscribe to atoms and receive it values in the callback. Important semantic difference is that subscription to atoms works as [`onChange` hook](https://www.reatom.dev/guides/lifecycle) and your callback will call during transaction, so you need to schedule an effects, but could mutate an atoms without batching. Subscriptions to a values works like regular `useEffect` hook. +`useUpdate` is a similar to `useEffect` hook, but it allows you to subscribe to atoms and receive it values in the callback. Important semantic difference is that subscription to atoms works as [`onChange` hook](https://www.reatom.dev/handbook#lifecycle) and your callback will call during transaction, so you need to schedule an effects, but could mutate an atoms without batching. Subscriptions to a values works like regular `useEffect` hook. The most common use case for this hook is to synchronize some state from a props or context to an atom. diff --git a/packages/npm-solid-js/README.md b/packages/npm-solid-js/README.md index 2ab2eac12..3ff98dfce 100644 --- a/packages/npm-solid-js/README.md +++ b/packages/npm-solid-js/README.md @@ -86,6 +86,6 @@ If you need to get the `ctx` from the context, you could use the shortcut hook ` ### Dynamic atom creation -This example shoes how to use [atomization](https://www.reatom.dev/guides/atomization) to improve editable fields performance, persists it to localStorage. +This example shoes how to use [atomization](https://www.reatom.dev/recipes/atomization) to improve editable fields performance, persists it to localStorage. https://stackblitz.com/edit/reatomnpm-solid-js-mssqxj?file=src/model.ts,src/App.tsx diff --git a/packages/react-v1/README.md b/packages/react-v1/README.md index 542e66244..0e8e6d377 100644 --- a/packages/react-v1/README.md +++ b/packages/react-v1/README.md @@ -1,6 +1,6 @@ -This is compatible package which allow you to use `@reatom/core-v1` with react. All docs is [here](https://www.reatom.dev/adapter/npm-react/). +This is compatible package which allow you to use `@reatom/core-v1` with react. All docs is [here](https://www.reatom.dev/package/npm-react/). ## Setup batching for old React diff --git a/packages/undo/README.md b/packages/undo/README.md index 2b8d1a59f..9842ab381 100644 --- a/packages/undo/README.md +++ b/packages/undo/README.md @@ -78,7 +78,7 @@ const formUndoAtom = reatomUndo([emailAtom, passwordAtom], { length: 50 }) ### reatomDynamicUndo -`reatomDynamicUndo` accepts a callback to spy a dynamic list of atoms and manage their changes in a single history line. It is useful when you want to use [atomization pattern](https://www.reatom.dev/guides/atomization/). It is a more powerful version of `reatomUndo`, but it requires proper subscription to function correctly. Also, the state of this atom is not useful, do not read it. +`reatomDynamicUndo` accepts a callback to spy a dynamic list of atoms and manage their changes in a single history line. It is useful when you want to use [atomization pattern](https://www.reatom.dev/recipes/atomization/). It is a more powerful version of `reatomUndo`, but it requires proper subscription to function correctly. Also, the state of this atom is not useful, do not read it. The second argument accepts all `withUndo` options. From 7ace90cebb8e748a4565c11758aef28f0bf69cea Mon Sep 17 00:00:00 2001 From: "BANO.notIT" Date: Sun, 7 Jan 2024 01:23:23 +0300 Subject: [PATCH 2/2] fix: homepage urls in package.json --- packages/core-v2/package.json | 2 +- packages/npm-cookie-baker/package.json | 2 +- packages/npm-history/package.json | 2 +- packages/npm-react/package.json | 2 +- packages/npm-svelte/package.json | 2 +- packages/react-v1/package.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/core-v2/package.json b/packages/core-v2/package.json index 97abffe61..2bb76bc4d 100644 --- a/packages/core-v2/package.json +++ b/packages/core-v2/package.json @@ -33,7 +33,7 @@ "bugs": { "url": "https://github.com/artalar/reatom/issues" }, - "homepage": "https://www.reatom.dev/adapter/core-v2", + "homepage": "https://www.reatom.dev/compat/core-v2", "files": [ "/build", "/package.json", diff --git a/packages/npm-cookie-baker/package.json b/packages/npm-cookie-baker/package.json index 68bed1f29..132769674 100644 --- a/packages/npm-cookie-baker/package.json +++ b/packages/npm-cookie-baker/package.json @@ -47,7 +47,7 @@ "bugs": { "url": "https://github.com/artalar/reatom/issues" }, - "homepage": "https://www.reatom.dev/adapter/npm-cookie-baker", + "homepage": "https://www.reatom.dev/package/npm-cookie-baker", "files": [ "/build", "/package.json" diff --git a/packages/npm-history/package.json b/packages/npm-history/package.json index c83b0744c..bc6905b87 100644 --- a/packages/npm-history/package.json +++ b/packages/npm-history/package.json @@ -46,7 +46,7 @@ "bugs": { "url": "https://github.com/artalar/reatom/issues" }, - "homepage": "https://www.reatom.dev/adapter/npm-history", + "homepage": "https://www.reatom.dev/package/npm-history", "files": [ "/build", "/package.json" diff --git a/packages/npm-react/package.json b/packages/npm-react/package.json index cd782e5f7..72f07ed8b 100644 --- a/packages/npm-react/package.json +++ b/packages/npm-react/package.json @@ -42,7 +42,7 @@ "bugs": { "url": "https://github.com/artalar/reatom/issues" }, - "homepage": "https://www.reatom.dev/adapter/npm-react", + "homepage": "https://www.reatom.dev/package/npm-react", "files": [ "/build", "/package.json" diff --git a/packages/npm-svelte/package.json b/packages/npm-svelte/package.json index e04babbe6..4c69f7158 100644 --- a/packages/npm-svelte/package.json +++ b/packages/npm-svelte/package.json @@ -42,7 +42,7 @@ "bugs": { "url": "https://github.com/artalar/reatom/issues" }, - "homepage": "https://www.reatom.dev/adapter/npm-svelte", + "homepage": "https://www.reatom.dev/package/npm-svelte", "files": [ "/build", "/package.json" diff --git a/packages/react-v1/package.json b/packages/react-v1/package.json index aee447593..39801d514 100644 --- a/packages/react-v1/package.json +++ b/packages/react-v1/package.json @@ -39,7 +39,7 @@ "bugs": { "url": "https://github.com/artalar/reatom/issues" }, - "homepage": "https://www.reatom.dev/adapter/react-v1", + "homepage": "https://www.reatom.dev/compat/react-v1", "files": [ "/build", "/package.json"