Code Monkey home page Code Monkey logo

vue-renderless-component's Introduction

RenderLess Components

文章引用

原文:在 vue.js 中使用函数式组件

中文版:函数式组件在 vue.js 中使用

函数式组件

函数式组件,意味着该组件无状态(没有响应式数据视图),无实例,因为没有视图渲染,因而渲染开销很低。大部分情况下用来包裹组件,配合作用域插槽,可以达到高阶组件的效果,用来分离视图渲染和业务逻辑非常有效,是一个值得注意的特性。

项目介绍

这个项目就是一个函数式组件使用的实例,分离了业务逻辑数据处理和视图渲染逻辑,使得一个组件可以应对不同种情况的布局。有需要的话可以下载下来运行看看,学习一下。

使用方式

代码下载下来之后,运行以下命令即可查看效果 npm install && npm run dev

项目截图

vue-renderless-component's People

Contributors

simplefeel avatar

Stargazers

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

Watchers

 avatar

vue-renderless-component's Issues

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.