From 84233489f8fc909e9812ce863e2e8800b92f4569 Mon Sep 17 00:00:00 2001 From: Brian Bower Date: Fri, 27 Mar 2020 13:20:01 -0600 Subject: [PATCH 1/2] Add nested component call info --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 425d77c5..17dfab4a 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,12 @@ $ rails g react:component my_subdirectory/HelloWorld greeting:string ``` Note: Your component is added to `app/javascript/components/` by default. +Note: If you generated into a subdirectory you will append the directory path to your erb component call. + +Example: +``` +<%= react_component("my_subdirectory/HelloWorld", { greeting: "Hello from react-rails." }) %> +``` ##### 7) [Render it in a Rails view](#view-helper): From d754987257f1a3f066c2ef8ddc8095c5d21e296b Mon Sep 17 00:00:00 2001 From: Brian Bower Date: Fri, 27 Mar 2020 13:23:47 -0600 Subject: [PATCH 2/2] Update nested component call directions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 17dfab4a..de046470 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ $ rails g react:component my_subdirectory/HelloWorld greeting:string ``` Note: Your component is added to `app/javascript/components/` by default. -Note: If you generated into a subdirectory you will append the directory path to your erb component call. +Note: If your component is in a subdirectory you will append the directory path to your erb component call. Example: ```