Skip to content

Commit cbedc33

Browse files
committed
Merge branch 'minor_punctuation' of https://github.com/mpantel/hyperstack into mpantel-minor_punctuation
2 parents fcc8e35 + 0d8ab85 commit cbedc33

6 files changed

Lines changed: 23 additions & 14 deletions

File tree

docs/client-dsl/component-basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ end
3838

3939
To create a component instance, you reference its class name as a method call from another component. This creates a new instance, passes any parameters and proceeds with the component lifecycle.
4040

41-
> **[The actual type created is an Element read on for details...](notes.md#component-instances)**
41+
> **[The actual type created is an Element, read on for details...](notes.md#component-instances)**
4242
4343
```ruby
4444
class FirstComponent < HyperComponent

docs/client-dsl/events-and-callbacks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Besides the UI there are several other sources of events:
145145
+ Web Workers
146146

147147
The way you receive events from these sources depends on the event. Typically though the method will either take a block, or callback proc, or in many cases will return a Promise.
148-
Regardless the event handler will do one of three things: mutate some state within the component, fire an event to a higher level component, or update some shared store.
148+
Regardless, the event handler will do one of three things: mutate some state within the component, fire an event to a higher level component, or update some shared store.
149149

150150
> For details on updating shared stores, which is often the best answer **[see the chapter on HyperState...](../hyper-state/README.md)**
151151

docs/client-dsl/lifecycle-methods.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ Except for `render`, multiple lifecycle callbacks may be defined for each lifecy
3636
The lifecycle revolves around rendering the component. As the state or parameters of a component change, its render callback will be executed to generate the new HTML.
3737

3838
```ruby
39-
render do ....
39+
render do
40+
...
4041
end
4142
```
4243

@@ -61,7 +62,8 @@ end
6162
### Before Mounting \(first render\)
6263

6364
```ruby
64-
before_mount do ...
65+
before_mount do
66+
...
6567
end
6668
```
6769

@@ -72,7 +74,8 @@ This is the only life cycle callback run during `render_to_string` used in serve
7274
### After Mounting \(first render\)
7375

7476
```ruby
75-
after_mount do ...
77+
after_mount do
78+
...
7679
end
7780
```
7881

@@ -83,7 +86,8 @@ If you want to integrate with other JavaScript frameworks, set timers using the
8386
### Before Receiving New Params
8487

8588
```ruby
86-
before_new_params do |new_params_hash| ...
89+
before_new_params do |new_params_hash|
90+
...
8791
end
8892
```
8993

@@ -102,7 +106,8 @@ end
102106
### Before Updating \(re-rendering\)
103107

104108
```ruby
105-
before_update do ...
109+
before_update do
110+
...
106111
end
107112
```
108113

@@ -111,7 +116,8 @@ Invoked immediately before rendering when new params or state are being received
111116
### After Updating \(re-rendering\)
112117

113118
```ruby
114-
after_update do ...
119+
after_update do
120+
...
115121
end
116122
```
117123

@@ -122,7 +128,8 @@ Use this as an opportunity to operate on the DOM when the component has been upd
122128
### Unmounting
123129

124130
```ruby
125-
before_unmount do ...
131+
before_unmount do
132+
...
126133
end
127134
```
128135

docs/client-dsl/notes.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Ruby methods may *receive* a block which is simply an anonymous function.
66

7-
The following code in Ruby
7+
The following code in Ruby:
88

99
```ruby
1010
some_method(1, 2, 3) { |x| puts x }
@@ -13,7 +13,7 @@ is roughly equivilent to this Javascript
1313
```JavaScript
1414
some_method(1, 2, 3 function(x) { console.log(x) })
1515
```
16-
In Ruby blocks may be specified either using `do ... end` or with `{ ... }`
16+
In Ruby blocks may be specified either using `do ... end` or with `{ ... }`:
1717

1818
```Ruby
1919
some_method { an_expression }
@@ -23,7 +23,7 @@ some_method do
2323
expressions
2424
end
2525
```
26-
Standard style reserves the `{ ... }` notation for single line blocks, and `do ... end` for multiple line blocks
26+
Standard style reserves the `{ ... }` notation for single line blocks, and `do ... end` for multiple line blocks.
2727

2828
### Component Instances
2929

@@ -140,6 +140,7 @@ default to the one provided by Hyperstack.
140140
### Proper Use Of Keys
141141

142142
> For best results the `key` is supplied at highest level possible. (NOTE THIS MAY NO LONGER BE AN ISSUE IN LATEST REACT)
143+
143144
```ruby
144145
# WRONG!
145146
class ListItemWrapper < HyperComponent
@@ -160,6 +161,7 @@ class MyComponent < HyperComponent
160161
end
161162
end
162163
```
164+
163165
```ruby
164166
# CORRECT
165167
class ListItemWrapper < HyperComponent

docs/client-dsl/params.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The param declaration has several options providing a default value, expected ty
99
Examples:
1010

1111
```ruby
12-
param :foo # declares that we must be provided with a parameter foo when the component is instantiated or re-rerendered.
12+
param :foo # declares that we must provide a parameter foo when the component is instantiated or re-rerendered.
1313
param :foo => "some default" # declares that foo is optional, and if not present the value "some default" will be used.
1414
param foo: "some default" # same as above using ruby 1.9 JSON style syntax
1515
param :foo, default: "some default" # same as above but uses explicit default key

docs/rails-installation/other-details.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ using webpacker its actually not necessary (but doesn't hurt anything.)
3232

3333
#### The application layout
3434

35-
If using a recent version of rails with webpacker you may find that the application.html.erb file longer loads the application.js file. Make sure that your layout file has this line:
35+
If using a recent version of rails with webpacker you may find that the application.html.erb file no longer loads the application.js file. Make sure that your layout file has this line:
3636

3737
```html
3838
<%= javascript_include_tag 'application' %>

0 commit comments

Comments
 (0)