1.0.1 • Published 7 years ago

yeps-views-react v1.0.1

Weekly downloads
6
License
MIT
Repository
github
Last release
7 years ago

YEPS Views React

YEPS React Template rendering

NPM

npm version Build Status Coverage Status Linux Build Windows Build

Dependency Status devDependency Status NSP Status

License GitHub stars GitHub forks GitHub issues Twitter

How to install

npm i -S yeps-views-react

How to use

views/index.jsx

import React from 'react';

export default props => <h1>{props.text}</h1>;

app.js

const App = require('yeps');
const views = require('yeps-views-react');

const app = new App();

app.all([
    views(__dirname + '/views');
]);

app.then(async ctx => {
    return ctx.render('index.jsx', { text: 'Hello!' });
});

Links