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
@@ -113,9 +113,9 @@ The following subdirectories are standard:
113
113
app/
114
114
...
115
115
hyperstack/
116
-
components/
117
-
models/
118
-
operations/
116
+
components/
117
+
models/
118
+
operations/
119
119
stores/
120
120
shared/
121
121
lib/
@@ -158,8 +158,8 @@ class HyperComponent
158
158
param_accessor_style :accessors
159
159
end
160
160
```
161
-
> Note: You can override the base class name using the `--base-class` switch:
162
-
> For example if you prefer ApplicationComponent rather than HyperComponent
161
+
> Note: You can override the base class name using the `--base-class` switch:
162
+
> For example if you prefer ApplicationComponent rather than HyperComponent
163
163
```bash
164
164
bundle exec rails g hyper:component Test --base-class=ApplicationComponent
165
165
```
@@ -200,7 +200,7 @@ and override the default layout
200
200
201
201
For example
202
202
```erb
203
-
<% render_component 'Dashboard', user: @user %>
203
+
<%= react_component 'Dashboard', user: @user %>
204
204
```
205
205
> Note that you may have several component trees mounted in a single page using the `render_component` helper. While this is not typical for a clean sheet Hyperstack design, it is useful when mixing Hyperstack with legacy applications.
206
206
@@ -253,7 +253,7 @@ various routing methods.
253
253
254
254
> Note that in a large app you may have several single page apps working together,
255
255
along with some legacy routes.
256
-
In such an application the router structure might look like this:
256
+
In such an application the router structure might look like this:
257
257
```ruby
258
258
Rails.application.routes.draw do
259
259
... # legacy routes
@@ -332,7 +332,7 @@ Webpacker uses manifests to determine how to package up assets. Hyperstack depe
332
332
>
333
333
> This means that page load time is comparable to any other Rails view, and that Rails can cache the pages like any other view.
334
334
>
335
-
> But to make this work packages that rely on the `browser` object cannot be used during prerendering. Well structured packages that depend on the `browser` object will have a way to run in the prerendering environment.
335
+
> But to make this work packages that rely on the `browser` object cannot be used during prerendering. Well structured packages that depend on the `browser` object will have a way to run in the prerendering environment.
336
336
337
337
These two files look like this and are placed in the `app/javascript/packs` directory:
338
338
```javascript
@@ -464,7 +464,7 @@ policies for legacy parts of your system.
464
464
465
465
#### Moving the `application_record.rb` File.
466
466
467
-
Once you have a basic Policy defined the client can access your Rails models. For your ActiveRecord model class definitions to be visible on the client you need to move them to the `app/hyperstack/models` directory. This directory (along with `app/hyperstack/operations` and `app/hyperstack/shared`) are *isomorphic* directories. The code in these directories will be accessible on both the client and the server.
467
+
Once you have a basic Policy defined the client can access your Rails models. For your ActiveRecord model class definitions to be visible on the client you need to move them to the `app/hyperstack/models` directory. This directory (along with `app/hyperstack/operations` and `app/hyperstack/shared`) are *isomorphic* directories. The code in these directories will be accessible on both the client and the server.
468
468
> Moving the files is necessary both because of the way Rails is structured, but its also very useful when evolving legacy systems to Hyperstack. Until a class
469
469
definition is moved to the `hyperstack/models` directory it will be ignored by Hyperstack.
0 commit comments