Skip to content

Commit

Permalink
more docs love
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniil Korostelev committed Jun 19, 2024
1 parent cd9cd0d commit df90c79
Show file tree
Hide file tree
Showing 19 changed files with 24 additions and 40 deletions.
2 changes: 1 addition & 1 deletion docs/articles/auto-async.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Asynchronous Auto-Observable
# Asynchronous Auto-Observable

In addition to normal [`auto-observables`](auto.md), it is also possible to create auto-observables using `async` computation functions. Auto-observable will take care of starting and awaiting asynchronous computation while tracking observable access at their every execution step.

Expand Down
2 changes: 1 addition & 1 deletion docs/articles/auto-run.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Auto-Runs
# Auto-Runs

Sometimes we simply want to run some code that depends on observable values and have it automatically re-invoked in case any of the used values is changed. We could use an [auto-observable](auto.md) with some dummy value for that, however if there's no need for an actual value it can get a bit awkward.

Expand Down
2 changes: 1 addition & 1 deletion docs/articles/auto.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Auto-Observable
# Auto-Observable

Auto-observables are the main way to derive observable data from a number of *source* observables by providing a *computation* function.

Expand Down
2 changes: 1 addition & 1 deletion docs/articles/binding-batching.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Binding batching
# Binding batching

The binding mechanism is designed to support *batching*. This means that the binding callbacks are not executed directly when an observable value is changed, instead they are scheduled for execution all together in a batch once per *frame*.

Expand Down
2 changes: 1 addition & 1 deletion docs/articles/binding.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Bindings
# Bindings

We briefly mentioned the `Bind` method in the [`Observable`](observable.md) article, which allows for subscribing to `Observable<T>` value changes to bind your code to it.

Expand Down
2 changes: 1 addition & 1 deletion docs/articles/collections-dict.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Observable Dictionary
# Observable Dictionary

> TODO: document
2 changes: 1 addition & 1 deletion docs/articles/collections-list.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Observable List
# Observable List

`ObservableList<T>` is an observable wrapper around the standard `List<T>`, providing the same API for managing the collection.

Expand Down
2 changes: 1 addition & 1 deletion docs/articles/collections.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Observable Collections
# Observable Collections

In addition to single-value observables, there are also a number of observable collections, such as `ObservableList` and `ObservableDictionary`.

Expand Down
2 changes: 1 addition & 1 deletion docs/articles/comparers.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Custom Comparers
# Custom Comparers

Observables are smart enough not to trigger bindings and recalculations when the value hasn't actually changed. This is handled on two levels:

Expand Down
2 changes: 1 addition & 1 deletion docs/articles/const.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Constant Observable
# Constant Observable

The most simple and lightweight kind of observable is the *const* observable for values that never change.

Expand Down
2 changes: 1 addition & 1 deletion docs/articles/godot.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Godot Specifics
# Godot Specifics

> **NOTE**: Godot support is currently fairly barebones and to be considered experimental. It seems to work pretty well, but it requires some amount of manual setup before using.
Expand Down
17 changes: 0 additions & 17 deletions docs/articles/intro.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/articles/observable.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Observable
# Observable

The core type of this library is `Observable<T>`. It represents observable data and its definition is pretty straightforward:

Expand All @@ -19,4 +19,4 @@ So there's a getter for the current value and a way to bind a callback for its c

There are multiple implementations of `Observable<T>` and most of them can be created using static methods in the [`Observable`](xref:TinkState.Observable) helper class.

See further articles about specific kinds of observables.
See further articles about specific kinds of observables.
3 changes: 2 additions & 1 deletion docs/articles/best-practices.md → docs/articles/remarks.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Remarks & Advices

## Thread-safety

This library is currently NOT thread-safe. There's no synchronization code and it uses some mutable static fields.

## Other (TODO)

> TODO: state updates from bindings and computations, splitting auto-observables, binding and subscription lifetimes
2 changes: 1 addition & 1 deletion docs/articles/state.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## State
# State

One important variation of `Observable<T>` is `State<T>`, which is a mutable observable, meaning you can also set the value:

Expand Down
4 changes: 2 additions & 2 deletions docs/articles/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
- name: Dictionary
href: collections-dict.md

- name: Best Practices & Cautions
href: best-practices.md
- name: Remarks & Advices
href: remarks.md

- name: Unity Specifics
href: unity.md
Expand Down
4 changes: 2 additions & 2 deletions docs/articles/unity-lifetime-helper.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Binding Lifetime
# Unity Binding Lifetime

It is very important to dispose bindings to observables when they are no longer needed for two main reasons:

Expand Down Expand Up @@ -81,4 +81,4 @@ var itemPool = new ObjectPool<PooledItem>(
);

itemPool.Get().Init(myData);
```
```
2 changes: 1 addition & 1 deletion docs/articles/unity.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Unity Specifics
# Unity Specifics

While the base library itself is very generic and does not have any dependencies, one of the main motivations for its creation was to assist Unity developers with handling their models and view models. So this library also integrates with Unity out-of-the-box.

Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ We want to structure our data nicely, as well as combine, transform and cache it

TinkState# aims to simplify and streamline this. In essence, it provides:

- Observable data structures (meaning you can read values and subscribe to changes).
- Means to define derived live-computed data from those observables (meaning changes to source values automatically updates derived values).
- Efficient binding mechanism for your code to react to changes (e.g. update the UI).
- Observable data structures (meaning you can read values and subscribe to changes).
- Means to define derived live-computed data from those observables (meaning changes to source values automatically updates derived values).
- Efficient binding mechanism for your code to react to changes (e.g. update the UI).

In other worlds, TinkState# implements reactive state handling. In terms of [MVVM](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel) architecture, it covers both model and viewmodel components.

Expand Down

0 comments on commit df90c79

Please sign in to comment.