@@ -9,7 +9,7 @@ With `react-laravel` you'll be able to use [ReactJS](https://facebook.github.io/
9
9
You just need to add this to your ` composer.json ` 's ` "require" ` :
10
10
11
11
``` json
12
- "talyssonoc/react-laravel" : " 0.3 " `
12
+ "talyssonoc/react-laravel" : " 0.4 " `
13
13
```
14
14
15
15
Also you got to set the ` minimum-stability ` of your ` composer.json ` to ` dev ` , adding this:
@@ -69,8 +69,9 @@ The `@react_component` directive accepts 3 arguments:
69
69
* ` componentName ` : Is the name of the global variable that holds your component.
70
70
* ` props ` : Associative of the ` props ` that'll be passed to your component
71
71
* ` options ` : Associative array of options that you can pass to the ` react-laravel ` :
72
- * ` prerender ` : Tells react-laravel to render your component server-side too and then just _ mount_ it on the client-side. Default to __ true__ .
72
+ * ` prerender ` : Tells react-laravel to render your component server-side, and then just _ mount_ it on the client-side. Default to __ true__ .
73
73
* ` tag ` : The tag of the element that'll hold your component. Default to __ 'div'__ .
74
+ * _ html attributes_ : Any other valid HTML attribute that will be added to the wrapper element of your component. Example: ` 'id' => 'my_component' ` .
74
75
75
76
All your components should be inside ` public/js/components.js ` (you can configure it, see below) and be global.
76
77
@@ -108,4 +109,8 @@ Both of then are optional.
108
109
* ` source ` : defaults to ` public/vendor/react/laravel/react.js ` .
109
110
* ` components ` : defaults to ` public/js/components.js `
110
111
111
- Your ` components.js ` file should also be included at your view, and all your components must be at the ` window ` object.
112
+ Your ` components.js ` file should also be included at your view, and all your components must be at the ` window ` object.
113
+
114
+ # Thanks
115
+
116
+ This package is inspired at [ react-rails] ( https://github.com/reactjs/react-rails ) .
0 commit comments