An open API service indexing awesome lists of open source software.

https://github.com/arunghosh/react-sequence

React component which can aid navigation between set of react components
https://github.com/arunghosh/react-sequence

navigation next previos react sequence

Last synced: 6 months ago
JSON representation

React component which can aid navigation between set of react components

Awesome Lists containing this project

README

          

# react-sequence

React component which can aid navigation between a set of react components. The sequence of components will be set as the children(see usage). There are 3 available navigation options now and these will ne injected to the props of the components
* **gotoNext** - shall navigate to the next component
* **gotoPrev** - shall navigate to the previous component
* **gotoKey** - shall navigate to the component specified by the argument

[![Build Status](https://travis-ci.org/arunghosh/react-sequence.svg?branch=master)](https://travis-ci.org/arunghosh/react-sequence)

## Installation
```
npm install --save react-sequence
```

## Usage

```javascript
import React from 'react';
import ReactDOM from 'react-dom';
import SeqenceForm from 'react-sequence';
import Page1 from './Page1';
import Page2 from './Page2';

ReactDOM.render(



,
document.getElementById('app')
);

```

**Page2.jsx**
```javascript
import React from 'react';

function Page2(props) {
return (


Page 2

Prev
props.gotoKey('page1')}>Next

);
}

export default Page2
```

**Page1.jsx**
```javascript
import React from 'react';

function Page1(props) {
return (


Page 1

Prev
Next

);
}

export default Page1
```