Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plume2 改进点 #26

Open
5 of 10 tasks
hufeng opened this issue Jul 16, 2018 · 8 comments
Open
5 of 10 tasks

plume2 改进点 #26

hufeng opened this issue Jul 16, 2018 · 8 comments

Comments

@hufeng
Copy link
Member

hufeng commented Jul 16, 2018

我们开始站在更高的起点去看问题,初心不变,方式更加优雅一点。

目标:
就是去平衡开发体验和用户体验之间的矛盾

  1. 更加爽快的开发体验
  2. 更棒的性能和用户体验

开发体验:

  1. 数据,事件,状态迁移的日志跟踪
  2. 无缝对接typescript,更好的融入typescript
  3. 更好的typescript类型的支持

用户体验:
更小的js体积
无缝web和react-native的开发体验

TODO

  • 快速生成脚手架
  • plume2-vscode快速代码模板
  • Actor是不是可以web worker异步化
  • Relax组件更直接的注入数据的方式, subscribe判断数据状态,如果不注入数据不setState
  • Store具有响应式的能力
  • babel-plugin-plume2通过babel去优化框架的设计
  • language service的支持
  • 合入条件判断高阶组件
  • 适配新的context的api
  • trace msg
@hufeng hufeng changed the title plume2 2.0 plan plume2 改进点 Jul 21, 2018
@hufeng
Copy link
Member Author

hufeng commented Sep 21, 2018

babel-plugin-plume2

  • 正式环境去除QL的name reduce js size
  • 正式环境去除StoreProvider中的{debug: xxx}

@hufeng
Copy link
Member Author

hufeng commented Sep 30, 2018

快速生成app脚手架的代码

❯ plume2
Usage: plume2 [options] [command]

Options:

  -V, --version  output the version number
  -h, --help     output usage information

Commands:

  new [name]     create a new plume2 app
  help [cmd]     display help for [cmd]

~/Github/plume2 master
❯

@hufeng
Copy link
Member Author

hufeng commented Sep 30, 2018

vscode plume2模板代码插件

@boneVidy
Copy link

感觉这个 interface 加个范型会灵活点,要不然每次注入都不能确定relaxProsps 类型
`/**

  • Relax容器组件的props类型
    /
    export interface IRelaxProps <T extends Object = Object>\ {
    relaxProps?: T;
    [name: string]: any;
    }
    /
    *
  • Relax容器组件的类型
    /
    export interface IRelaxComponent extends React.ComponentClass {
    relaxProps?: Object;
    }
    /
    *
  • Store数据容器的参数配置类型
    */
    export interface IOptions {
    debug?: boolean;
    [name: string]: any;
    }`

@hufeng
Copy link
Member Author

hufeng commented Mar 21, 2019

@boneVidy yes 是的,我最近也是这样想 抽空重构下

@hufeng
Copy link
Member Author

hufeng commented Mar 21, 2019

@boneVidy 我最近在想一个清量一点方案 和你有非常一致的想法 用hook https://github.com/hufeng/iant/tree/master/example/todo

@boneVidy
Copy link

@hufeng 看了下 ,有点immer 结合hooks 的味道
👍

@hufeng
Copy link
Member Author

hufeng commented Mar 22, 2019

@boneVidy 是的 用immer的一个尝试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants