Try improve crash course

This commit is contained in:
Aaron Smith 2023-11-21 18:48:47 +00:00
parent c288cb92c4
commit 338c66ed57
11 changed files with 223 additions and 102 deletions

View file

@ -1,6 +1,6 @@
# Stateful Components
A stateful component is a component that stores and displays some data.
A stateful component is a component that can update in reponse to data.
Stateful components in Vide are created using sources and effects - sources to
store the data, and effects to display the data.
@ -32,9 +32,6 @@ end
Above is an example of a counter component, that when clicked, will increment
its internal count, and automatically update its text to reflect that count.
Making a property update based on a source is also referred to as *property
binding*.
Each instance of `Counter()` will maintain its own independent count, since the
count source is created inside the scope of the component.
@ -70,4 +67,4 @@ count(1) -- the Counter component will update to display this count
Sources can be created internally or passed in from externally, there are no
restrictions on how they are used as long as the effect using it is created
within a reactive scope so that it can be cleaned up later.
within a reactive scope.