Skip to content

Commit 8423348

Browse files
author
Brian Bower
committed
Add nested component call info
1 parent d5da111 commit 8423348

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ $ rails g react:component my_subdirectory/HelloWorld greeting:string
114114
```
115115
Note: Your component is added to `app/javascript/components/` by default.
116116

117+
Note: If you generated into a subdirectory you will append the directory path to your erb component call.
118+
119+
Example:
120+
```
121+
<%= react_component("my_subdirectory/HelloWorld", { greeting: "Hello from react-rails." }) %>
122+
```
117123

118124
##### 7) [Render it in a Rails view](#view-helper):
119125

0 commit comments

Comments
 (0)