Git Product home page Git Product logo

tidy's Introduction

TypeScript Next.js project

This is a typescript next.js example, integrated some modules like less, ant design and redux-observable.

How to start?

Using git clone this repo

cd tidy

Install dependencies with:

npm install
# or
yarn install

Run it

npm run dev
# or
yarn dev

This project is based on next.js examples

with-typescript @zeit/with-typescript

and

with-redux-observable @zeit/with-redux-observable

更新日志

1.0.0 框架集成

1.0.1 model中加入getter getter接受全局state并返回结果 结果放入model state

Why name tidy?

Just like @dvajs/dva, models handle the business, I placed epics and reducers together in model, this form of model structure makes the business more clear and the project tidy. This is just the begining, it will be continually updated.

😅😅😅

英文说明以后补充。 先用中文说明下, 这个项目解决了next官方示例没有解决或没有提到的一些问题,例如:antd样式动态加载(ts环境),cssModules影响antd样式等问题。

当然,做这个项目不希望仅仅只是整合, 也希望能够成为一个效率高,结构简单,用法简单的业务框架。

项目扩展方向:

在使用dva的过程中,觉得model的设计太突出了,把react项目中零碎的业务逻辑都整合起来,业务变得清晰易维护。 所以,我想试着用dva中model的形式来组织redux-observable代码。

另外,我也会试着在model中加入一些其他实用方法。 在使用dva的过程中,我感觉从model中取值往往很繁琐,尤其是在state结构复杂或相关联之后。 vuex的getter不错,将一些状态的提取公式化,这样就不用担心state复杂后,使用繁琐了。

同时,对应不同的业务场景,model的state设计会有区别, 但有一些不错的设计模式,我觉得可以集成到model中,避免model中有过多的胶水代码。

model的按需加载。 按照next.js的规则。model应跟随路由加载。

tidy's People

Contributors

goodwinfame avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

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.