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/installation.md
+15-8Lines changed: 15 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -260,16 +260,16 @@ you will may want to direct the output to a dedicated log file for example.
260
260
261
261
The Rails webpacker gem will bundle up all your javascript assets including those used by Hyperstack such as React, and React-Router.
262
262
263
-
You can also easily add other NPM (node package manager) assets to the webpacker *pack files*.
263
+
You can easily add other NPM (node package manager) assets to the webpacker *pack files*.
264
264
265
-
Hyperstack will look for two webpacker pack files: one for packages that *only* run on the client side, and packages that can run on *both* the client, and during server prerendering.
265
+
Hyperstack will look for two pack files: one for packages that *only* run on the client side, and the other for packages that can run on *both* the client and during server prerendering.
266
266
> Prerendering builds the initial page view server side, and then delivers it to the client as a normal static HTML page. Attached to the HTML are flags that React will use update the page as components are re-rendered after the initial page load.
267
267
>
268
268
> This means that page load time is comparable to any other Rails view.
269
269
>
270
-
> 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.
270
+
> 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.
271
271
272
-
You will also need to fetch the packages, plus any of their dependencies and bring them into your build environment.
272
+
Once you have the pack files setup you will also need to fetch the packages, plus any of their dependencies and bring them into your build environment.
273
273
274
274
> Coming from Ruby this can be confusing as we are used to simply adding a dependency into the `Gemfile`, and then using bundler to both fetch dependencies, and produce the `Gemfile.lock` file.
275
275
>
@@ -309,12 +309,19 @@ First you need make sure you have `yarn` installed:
309
309
Once yarn is installed you need to add the following packages which Hyperstack depends on:
310
310
311
311
```text
312
-
yarn add react@16 react-dom@16 \
313
-
react-router@^5.0.0 react-router-dom@^5.0.0 \
314
-
react_ujs@^2.5.0 jquery@^3.4.1
312
+
yarn add react@16
313
+
yarn add react-dom@16
314
+
yarn add react-router@^5.0.0
315
+
yarn add react-router-dom@^5.0.0
316
+
yarn add react_ujs@^2.5.0
317
+
yarn add jquery@^3.4.1
315
318
```
316
319
317
-
And now you are good to go. In the future if you want to add a new
320
+
And now you are good to go. In the future if you want to add a new package like [react-datepicker](https://reactdatepicker.com/), you would run
0 commit comments