All Projects → Tecode → next_react

Tecode / next_react

Licence: other
React16.6.1+Mobx5+Express服务端渲染脚手架,支持代码自动分割

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to next react

baltar
Example graphics editor using MobX
Stars: ✭ 42 (+250%)
Mutual labels:  mobx
public-ol-native-template
OrangeLoops React-Native Project Boilerplate
Stars: ✭ 37 (+208.33%)
Mutual labels:  mobx
hooksy
Simple app state management based on react hooks
Stars: ✭ 58 (+383.33%)
Mutual labels:  mobx
react-mobx
No description or website provided.
Stars: ✭ 25 (+108.33%)
Mutual labels:  mobx
public-ol-web-template
OrangeLoops Web Project Boilerplate
Stars: ✭ 28 (+133.33%)
Mutual labels:  mobx
mobx-nextjs-root-store
Mobx root store implementation for next.js with server-side rendering
Stars: ✭ 42 (+250%)
Mutual labels:  mobx
weapp-starter-kit
No description or website provided.
Stars: ✭ 13 (+8.33%)
Mutual labels:  mobx
mobxSpa
企业级SPA项目,完整开发脚手架
Stars: ✭ 96 (+700%)
Mutual labels:  mobx
YugiohCards
Yugioh Cards Sample App using MobX, Provider, and Chopper
Stars: ✭ 31 (+158.33%)
Mutual labels:  mobx
ecommerce-react-native
The ideal starter kit / app script with all the needed UI elements alongwith MobX and NativeBase to build your iOS and Android e-commerce app like Mona / JackThreads / Canopy / Flipp
Stars: ✭ 86 (+616.67%)
Mutual labels:  mobx
elastic-composer
Client-side Elasticsearch query generator and executor. Filter fields, find search suggestions, and paginate query results for your indicies using a simple, reactive, and high-level API
Stars: ✭ 14 (+16.67%)
Mutual labels:  mobx
WebMIDICon
🎹🥁 My MIDI instruments!
Stars: ✭ 60 (+400%)
Mutual labels:  mobx
mobx-react-intl
A connector between mobx-react and react-intl
Stars: ✭ 32 (+166.67%)
Mutual labels:  mobx
wizard
🍳Wizardoc is a WEBAPP for managing documents and knowledge.
Stars: ✭ 57 (+375%)
Mutual labels:  mobx
mobx-wxapp
在小程序中使用mobx
Stars: ✭ 54 (+350%)
Mutual labels:  mobx
data-flow
frontend data flow explored in React
Stars: ✭ 19 (+58.33%)
Mutual labels:  mobx
mutable
State containers with dirty checking and more
Stars: ✭ 32 (+166.67%)
Mutual labels:  mobx
navigation-mobx-example
proof of concept project to use mobX in react-native-navigation
Stars: ✭ 47 (+291.67%)
Mutual labels:  mobx
mobx-loading
参考了 dva-loading 的思路,基于 mobx 实现了用于监控各个 mode 和 effect 加载状态的组件
Stars: ✭ 23 (+91.67%)
Mutual labels:  mobx
the movie app open source
🎬 an app that lists movies in theaters and that will be released, and their respective actors using the api of the movie database, made with Flutter using Modular and MobX
Stars: ✭ 29 (+141.67%)
Mutual labels:  mobx

图片 图片 图片

Next.js是服务端渲染呈现的React应用程序的简约框架,这个项目通过配置Next.js+Mbox实现的一个Demo.

模块

  • react-helmet
  • mobx v5.0.3
  • next
  • less
  • Express v4.16.3
  • React v16.4.2
  • next-routes
  • antd v3.9.2

预览图

图片 图片

功能

  • 服务端渲染
  • js按需加载
  • Mobx状态管理器

其它

使用了动态路由跳转使用next-routes提供的方法

路由声明routers/index.js

const routes = require('next-routes');

module.exports = routes()
.add('demo', '/demo/:id', 'demo')
.add('nestedRouter', '/nested_router', 'nestedRouter')
.add('link1', '/nested_router/link1', 'nestedRouter/link1')
.add('link2', '/nested_router/link2', 'nestedRouter/link2')
.add('netWork', '/netWork', 'netWork')
.add('structChart', '/struct_chart', 'structChart')

使用Link路由跳转

import {Link} from '../routes'

export default () => (
  <div>
    <div>Welcome to Next.js!</div>
    <Link route='blog' params={{slug: 'hello-world'}}>
      <a>Hello world</a>
    </Link>
    或者
    <Link route='/blog/hello-world'>
      <a>Hello world</a>
    </Link>
  </div>
)

使用Router跳转路由

import React from 'react'
import {Router} from '../routes'

export default class Blog extends React.Component {
  handleClick () {
    // With route name and params
    Router.pushRoute('blog', {slug: 'hello-world'})
    // With route URL
    Router.pushRoute('/blog/hello-world')
  }
  render () {
    return (
      <div>
        <div>{this.props.url.query.slug}</div>
        <button onClick={this.handleClick}>Home</button>
      </div>
    )
  }
}

如何使用

安装

npm install 或 yarn(推荐)

开发环境运行

npm run dev

产品环境运行

npm start

打包HTML静态文件

npm run biuld
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].