rehace

WebJar for rehace

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

rehace
Last Version

Last Version

0.1.3
Release Date

Release Date

Type

Type

jar
Description

Description

rehace
WebJar for rehace
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/burning-duck/rehace

Download rehace

How to add to project

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

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm » react-habitat jar [0.4.2,0.5)

Project Modules

There are no modules declared in this project.

rehace

React-Habitat-Cerebral: Components for HTML

Connects React-Habitat components to a single Cerebral controller.

Install

yarn add @burning-duck/rehace

Basic Usage

You can find a simple demo using the Counter example from the cerebral sitein the /demo folder of this repo. See the working example at https://burning-duck.github.io/rehace/.

The main difference is, that you don't render your root Components into the page. Just register them in an React-Habitat container for later use.

ReHaCe wraps each registered component in an Cerebral container using controller instance you passed in. This allows each component to connect to the same state.

index.js

import { Rehace } from '@burning-duck/rehace'

// This is the Cerebral controller
import controller from './controller'

// Components to register
import Counter from './components/Counter'
import IncreaseButton from './components/IncreaseButton'
import DecreaseButton from './components/DecreaseButton'

export const app =  Rehace(Module{
  controller: controller,
  components: {
    'Counter': Counter,
    'IncreaseButton': IncreaseButton,
    'DecreaseButton': DecreaseButton
  }
})

In your HTML file you can use React-Habitat syntax to use the components.

index.html

<p>
    The current count is <strong><span data-component="Counter"></span></strong>.<br/>
    You can increase the counter: <span data-component="IncreaseButton"></span>.<br/>
    You can descrease the counter: <span data-component="DecreaseButton"></span>.<br/>
</p>

Read more

org.webjars.npm

burning-duck

burning-duck.de - Until the duck is burning

Versions

Version
0.1.3