Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
justin808 committed Oct 3, 2018
1 parent ca78510 commit 7483850
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 9 additions & 5 deletions docs/api/view-helpers-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@ Once the bundled files have been generated in your `app/assets/webpack` folder a
```ruby
react_component(component_name,
props: {},
prerender: nil,
trace: nil,
replay_console: nil,
raise_on_prerender_error: nil,
id: nil,
prerender: nil)
html_options: {})
```

Uncommonly used options:
```
trace: nil,
replay_console: nil,
raise_on_prerender_error: nil,
id: nil,
```

- **component_name:** Can be a React component, created using an ES6 class or a generator function that returns a React component (or, only on the server side, an object with shape { redirectLocation, error, renderedHtml }), or a "renderer function" that manually renders a React component to the dom (client side only).
All options except `props, id, html_options` will inherit from your `react_on_rails.rb` initializer, as described [here](../basics/configuration.md).
- **general options:**
Expand Down
3 changes: 3 additions & 0 deletions lib/react_on_rails/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ def self.configuration
replay_console: true,
logging_on_server: true,
raise_on_prerender_error: false,
# Should we change?
# raise_on_prerender_error: Rails.env.development?,

trace: Rails.env.development?,
development_mode: Rails.env.development?,
server_renderer_pool_size: DEFAULT_POOL_SIZE,
Expand Down

0 comments on commit 7483850

Please sign in to comment.