Giter VIP home page Giter VIP logo

newtoday's Introduction

React仿今日头条app

公司项目一直使用vue做项目,去年自学了react后。一直没有机会用它来做实践,加上许久没有写过react,都快要忘记react怎么写了,所以本来想趁着最近有点空闲,自己用react仿写一个webapp。花了一上午时间重新看了下react文档,又花了一下午写了这个demo,由于时间原因,暂时只能停下。等以后有空再继续往下做下去吧。

  • 项目脚手架:generator-react-webpack
  • 路由使用了 react-router-dom
  • 数据请求使用 axios
  • 由于自己不会抓包,看网上提供的api请求只能免费10条,多了就要钱,所以就简单的在今日头条拷贝了几条数据
  • 使用 express 简单的搭建了下后台服务器,简单的mock了下数据,能够模仿正常请求数据。

在项目 src目录下的 mock 文件里运行命令 node index 启动�node服务,

在项目根目录下运行 npm start 跑起项目

demo效果图如下: 有时间的话接着完善吧

Kapture 2018-03-20 at 16.18.20.gif

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.