GithubHelp home page GithubHelp logo

react-love / react-next Goto Github PK

View Code? Open in Web Editor NEW
74.0 6.0 51.0 2.86 MB

稳定版本

License: MIT License

JavaScript 8.37% CSS 2.21% HTML 89.42%
react react16 redux next next-router webpack3 redux-thunk scss

react-next's Introduction

react-next

这是一个next架构为主的react服务端渲染模板,实现了以下功能:

  • webpack,包括开发环境下的热更新等功能,以及部署环境下的打包功能
  • babelrc配置
  • 支持scss
  • 支持next-router
  • 支持redux
  • 支持图片格式文件
  • 支持axios
  • 支持gzip

服务端渲染

本项目基于服务端渲染

客户端渲染

如果你不想使用服务端渲染,可以选择本项目的客户端渲染实现:https://github.com/hyy1115/react-redux-webpack3

安装教程

1、你需要下载本项目,可以fork到你的个人github账号上,然后在你的账号下载项目

2、 安装依赖包

npm install && yarn

3、运行项目 有5个可执行命令,作用都不相同。

1、在开发环境下,执行:

npm run dev

2、在生产环境下,执行:

打包

npm run build //这是普通打包

npm run build-analyze //这是带有分析模块的打包

启动服务

npm start //最后运行

npm run stop //停止服务

教程

前往:[本项目使用教程文档][1]

[1] https://github.com/hyy1115/react-next/blob/master/doc/%E6%95%99%E7%A8%8B.md

react-next's People

Contributors

dependabot[bot] avatar hyy1115 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

react-next's Issues

...

npm build npm start

本地node模拟生产环境 没法用 npm start 吗

..

npm build npm start

报错
[email protected] start C:\Users\liujiwei\Desktop\新闻内容react\react-next

NODE_ENV=production start server.js

'NODE_ENV' ▒▒▒▒▒ڲ▒▒▒▒ⲿ▒▒▒Ҳ▒▒▒ǿ▒▒▒▒еij▒▒▒
▒▒▒▒▒▒▒▒▒ļ▒▒▒
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: NODE_ENV=production start server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\liujiwei\AppData\Roaming\npm-cache_logs\2018-01-15T07_12_32_918Z-debug.log

请教 next.js 做 seo 优化的原理

您好,最近想用 react 提升门户网站的开发效率(但,最蛋疼的是要做 seo 优化)

网上比较好的答案都指向了 next.js

想请教一下 next.js 可以实现 seo 优化的原理 O(∩_∩)O

以下内容纯碎瞎猜,还没验证,请大神指点指点

next.js出来的效果是否跟传统多页面的网站一样?——每一个页面对应一个路由,然后在访问每一个路由时向服务器发送一个请求,返回当前路由对应的页面的数据。( ps:在下孤落寡闻,目前只知道这种形式对 seo 友好——相当于不需要让爬虫执行 js,所有页面的数据都从服务器返回)

react router V4

Hello,我看到这个项目 感觉非常好,但是我看了下发现并没有使用react router v4。请问有使用react router v4 服务端渲染的demo吗? 十分感谢。

运行报错

为什么我安装依赖后,运行报错呢?什么操作都没有做,只是npm install了一下,然后再运行npm run dev
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.