Update readme

This commit is contained in:
Mediha Zukic
2017-06-20 14:16:10 +02:00
parent 8aa243f1e9
commit 5348569dd2

View File

@@ -30,11 +30,28 @@ In Eclipse go to Build Path -> Configure Build Path, select Java Build Path on t
- gwt-react-0.6.0.jar
- gwt-servlet.jar
Libraries located in /GWTReactApp/war/WEB-INF/lib/ folder.
Libraries are located in /GWTReactApp/war/WEB-INF/lib/ folder.
Right click on project folder and select Run As -> Web Application (GWT Super Dev Mode)
## Adding addition React modules
## Adding additional React modules
1. Step 6 explained in details in gwt-react library documentation file given at https://github.com/GWTReact/gwt-react/blob/master/DOCUMENTATION.md
2. Add updated .js file to the project, add it as static <script> tag to projects html, or inject it on run time using
```Java
ScriptInjector.fromString(JsClientBundle.INSTANCE.gwtreactbundlejs().getText()).inject();
ScriptInjector.fromString(JsClientBundle.INSTANCE.gwtreactrouterbundlejs().getText()).inject();
```
in `onModuleLoad()`
```Java
public interface JsClientBundle extends ClientBundle {
final JsClientBundle INSTANCE = GWT.create(JsClientBundle.class);
@Source("resources/gwt-react-bundle.min.js")
TextResource gwtreactbundlejs();
@Source("resources/gwt-react-router-bundle.min.js")
TextResource gwtreactrouterbundlejs();
}
```
1. Step 6 explained in details in in gwt-react library documentation file given at https://github.com/GWTReact/gwt-react/blob/master/DOCUMENTATION.md
2. Add updated .js file to the project (add it as static <script> tag to projects html, or inject it on run time)