@ridi/react-ridi-webviewer
React-Redux based comics viewer
Last updated 2 years ago by namenu .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @ridi/react-ridi-webviewer 
SYNC missed versions from official npm registry.

react-ridi-webviewer

npm version

Installation

npm install ridi-webviewer

How to use

Add ridi-webviewer reducer into your reducers.

import { reducers as viewerScreen } from 'ridi-webviewer';
import { combineReducers } from 'redux';

const appReducer = combineReducers({
    ...
    viewerScreen,
    ...
});

Connect ViewerHelper, PageCalculator with redux store.

import { createStore } from 'redux';
import { ViewerHelper, PageCalculator } from 'ridi-webviewer';

const store = createStore( ... );
ViewerHelper.connect(store);
PageCalculator.connect(store);

Put ViewerScreen component into your component.

import React, { Component } from 'react';
import ViewerScreen from 'ridi-webviewer';

export default ViewerPage extends Component {
    render() {
        <ViewerScreen />
    }
};

Dispatch renderSpine action.

import { renderSpine } from 'ridi-webviewer';

...
const index = 0;
const html = '<h1>hello, world</h1>';
dispatch(renderSpine(index, html));

Current Tags

  • 0.1.2                                ...           latest (2 years ago)

1 Versions

  • 0.1.2                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 5
Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |