# React Projects

A Skypager project can declare that it is a react project and be given access to a wide range
of helpers to use.

## Setup

```javascript
const chai = require('chai')
const testProject = project
const attach = require('./src/helpers/project-types/react').attach
attach(project)
```

## Specifications

### Provides commands

```javascript
project.commands.available.should.include('react')
```

### Provides compilers 

```javascript
project.compilers.available.should.include('react-document')
```

### Provides document types

```javascript
project.documentTypes.available.should.include('react-markdown')
```

### Provides renderers

```javascript
project.renderers.available.should.include('basic')
```

### Provides a project type

```javascript
project.projectTypes.available.should.include('react')
```

## Features

### Rendering a component in the project's context

```javascript
project.should.have.property('render').that.is.a('function')
```

### Rendering to a string 

```javascript
project.should.have.property('renderString').that.is.a('function')
```

### Rendering to static markup 

```javascript
project.should.have.property('renderMarkup').that.is.a('function')
```

### Command Line Interface

The Command Line Interface can be used to render react components.

```javascript
const command = project.commands.lookup('react')
command.should.be.an('object').that.has.a.property('run').that.is.a('function')
```