Coder Social home page Coder Social logo

Comments (3)

dntzhang avatar dntzhang commented on May 4, 2024 2
  1. 后期会向下兼容平滑过渡,其实前期各个版本也是比较平滑
  2. 使用 omi.art.js 不需要使用 art-template
  3. 更新必须调用 update 或者 updateSelf。 可以通过声明 preventSelfUpdate 阻止组件内部自己的update
  4. router还是单例比较好, OmiRouter.init只能执行一次,router规则全部集中在一个地方。如果有渲染到其他节点的需求,可以在每个route里加对应的renderTo。比如:
OmiRouter.init({
    routes: [
        {path: '/', component: Home},
        {path: '/about', component: About},
        {path: '/user-list', component: UserList},
        {path: '/user/:name/category/:category', component: User, renderTo: "#otherView"}
    ],
    renderTo: "#view",
    defaultRoute: '/',
    root: this
})

5.参见 omi-cli 的代码分割部分,使用 https://github.com/AlloyTeam/omi-cli#代码分割
6.目前没有打算

from omi.

RubyLouvre avatar RubyLouvre commented on May 4, 2024

欢迎加入 370262116,一起讨论迷你React,本群已经收集了三个迷你React的作者了

from omi.

dntzhang avatar dntzhang commented on May 4, 2024

@RubyLouvre 赞,已申请~

from omi.

Related Issues (20)

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.