jreact

Server-side react.js rendering with java7 or java8

Лицензия

Лицензия

BSD
Категории

Категории

React Взаимодействие с пользователем Веб-фреймворки
Группа

Группа

de.matrixweb
Идентификатор

Идентификатор

jreact
Последняя версия

Последняя версия

0.0.4
Дата

Дата

Тип

Тип

jar
Описание

Описание

jreact
Server-side react.js rendering with java7 or java8
Ссылка на сайт

Ссылка на сайт

https://github.com/KnisterPeter/jreact
Система контроля версий

Система контроля версий

https://github.com/KnisterPeter/jreact

Скачать jreact

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/de.matrixweb/jreact/ -->
<dependency>
    <groupId>de.matrixweb</groupId>
    <artifactId>jreact</artifactId>
    <version>0.0.4</version>
</dependency>
// https://jarcasting.com/artifacts/de.matrixweb/jreact/
implementation 'de.matrixweb:jreact:0.0.4'
// https://jarcasting.com/artifacts/de.matrixweb/jreact/
implementation ("de.matrixweb:jreact:0.0.4")
'de.matrixweb:jreact:jar:0.0.4'
<dependency org="de.matrixweb" name="jreact" rev="0.0.4">
  <artifact name="jreact" type="jar" />
</dependency>
@Grapes(
@Grab(group='de.matrixweb', module='jreact', version='0.0.4')
)
libraryDependencies += "de.matrixweb" % "jreact" % "0.0.4"
[de.matrixweb/jreact "0.0.4"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
com.fasterxml.jackson.core : jackson-databind jar 2.3.1

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.11

Модули Проекта

Данный проект не имеет модулей.

jreact

react.js on server-side java (with rhino or nashorn)

Usage

To setup jreact create a de.matrixweb.jreact.JReact instance, call the #addRequirePath method with the path to your script sources and/or npm modules. This is enough for setup.

To do a render cycle call the #render method with the path to your entry point script (relative to the require-path) and a map which is give to react as props for the root instance.

Example

JReact react = new JReact();
react.addRequirePath("./src");
react.addRequirePath("./src/node_modules");

Map<String, Object> props = new HashMap<>();
props.put("text", "Hello World!");
// The app.js will be required from the above configured require-paths
String result = react.renderToString("./app.js", props);

For further examples look here: https://github.com/KnisterPeter/jreact-examples

Версии библиотеки

Версия
0.0.4
0.0.3
0.0.2
0.0.1