Skip to content

Commit f2c05cd

Browse files
committed
run prettier
1 parent beb70fa commit f2c05cd

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ yalc add react-on-rails
227227
```
228228

229229
### Testing the Generator
230+
230231
The generators are covered by generator tests using Rails's generator testing helpers, but it never hurts to do a sanity check and explore the API. See [generator-testing.md](docs/contributor-info/generator-testing.md) for a script on how to run the generator on a fresh project.
231232

232233
`rake run_rspec:shakapacker_examples_basic` is a great way to run tests on one generator. Once that works, you should run `rake run_rspec:shakapacker_examples`. Be aware that this will create a huge number of files under a `/gen-examples` directory. You should be sure to exclude this directory from your IDE and delete it once your testing is done.

docs/guides/render-functions-and-railscontext.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ const MyAppComponent =
2727

2828
// the props get passed again, but we ignore since we use a closure
2929
// or should we
30-
() => (
31-
<div>
32-
<p>props are: {JSON.stringify(props)}</p>
33-
<p>railsContext is: {JSON.stringify(railsContext)}</p>
34-
</div>
35-
);
30+
() =>
31+
(
32+
<div>
33+
<p>props are: {JSON.stringify(props)}</p>
34+
<p>railsContext is: {JSON.stringify(railsContext)}</p>
35+
</div>
36+
);
3637
export default MyAppComponent;
3738
```
3839

@@ -150,7 +151,8 @@ const AppComponentWithRailsContext =
150151
(props, railsContext) =>
151152
// Create a React Function Component so you can
152153
// use the React Hooks API in this React Function Component
153-
() => <AppComponent {...{ ...props, railsContext }} />;
154+
() =>
155+
<AppComponent {...{ ...props, railsContext }} />;
154156
export default AppComponentWithRailsContext;
155157
```
156158

spec/dummy/client/app/startup/RouterApp.server.jsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import { StaticRouter } from 'react-router-dom';
33

44
import routes from '../routes/routes';
55

6-
export default (props, railsContext) => () => (
7-
<StaticRouter location={railsContext.location} {...props}>
8-
{routes}
9-
</StaticRouter>
10-
);
6+
export default (props, railsContext) => () =>
7+
(
8+
<StaticRouter location={railsContext.location} {...props}>
9+
{routes}
10+
</StaticRouter>
11+
);

0 commit comments

Comments
 (0)