You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/installation/upgrading.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ In Hyperstack we are using Rails templates to create new applications.
21
21
+ Follow these instructions: https://github.com/hyperstack-org/hyperstack/tree/edge/install
22
22
+ See the template for an understanding of the installation steps: https://github.com/hyperstack-org/hyperstack/blob/edge/install/rails-webpacker.rb
23
23
24
-
**If you aee not upgrading an existing Hyoperloop application you do not need to follow the rest of these instructions.**
24
+
**If you are not upgrading an existing Hyoperloop application, you do not need to follow the rest of these instructions.**
25
25
26
26
## Hyperstack gem
27
27
@@ -64,9 +64,9 @@ The simplest way to implement this change is a global search and replace in your
64
64
65
65
## There is a new concept of a base `HyperComponent` and `HyperStore` base class
66
66
67
-
In Hyperloop, all Components and Stores inherited from a base `Hyperloop::Component` class. In HyperStack (following the new Rails convention), we do not provide the base class but encourage you to create. your own. This is very useful for containing methods that all your Components share.
67
+
In Hyperloop, all Components and Stores inherited from a base `Hyperloop::Component` class. In HyperStack (following the new Rails convention), we do not provide the base class but encourage you to create your own. This is very useful for containing methods that all your Components share.
68
68
69
-
To implement this change, you need to create your own HyperComponent class:
69
+
To implement this change, you need to create your HyperComponent class:
70
70
71
71
```ruby
72
72
classHyperComponent
@@ -107,9 +107,9 @@ end
107
107
108
108
**The same is true for `Hyperloop::Store` to `HyperStore`**.
109
109
110
-
ou will need to create a `HyperStore` class and make the same changes as above.
110
+
You will need to create a `HyperStore` class and make the same changes as above.
111
111
112
-
Note that in Hyperstack, any ruby class can be a store simply by including the `include Hyperstack::State::Observable` mixin.
112
+
Note that in Hyperstack, any ruby class can be a store by merely including the `include Hyperstack::State::Observable` mixin.
113
113
114
114
For example:
115
115
@@ -155,7 +155,7 @@ There are several advantages to this new approach:
155
155
156
156
+ It is significantly faster (ask Mitch)
157
157
+ It feels more natural to think about state variables as normal instance variables
158
-
+ You only use the `mutate` method when you want React to re-render based ont eh change to state. This gives you more control.
158
+
+ You only use the `mutate` method when you want React to re-render based on the change to state. This gives you more control.
159
159
+ You can string mutations together. For example:
160
160
161
161
```ruby
@@ -202,7 +202,7 @@ A Hyperstack router looks like this:
202
202
203
203
```ruby
204
204
classMainFrame < HyperComponent
205
-
includeHyperstack::Router# note the inclusing of the Router mixin
205
+
includeHyperstack::Router# note the inclusion of the Router mixin
0 commit comments