GithubHelp home page GithubHelp logo

isabella232 / meteor-blaze-common-component Goto Github PK

View Code? Open in Web Editor NEW

This project forked from peerlibrary/meteor-blaze-common-component

0.0 0.0 0.0 160 KB

An extended base Blaze Component with common features

Home Page: https://atmospherejs.com/peerlibrary/blaze-common-component

CoffeeScript 87.04% JavaScript 6.00% Shell 4.99% CSS 0.19% HTML 1.78%

meteor-blaze-common-component's Introduction

Common Component

An alternative base Blaze Component extended with common features.

Adding this package to your Meteor application adds CommonComponent and CommonMixin classes into the global scope.

Pull requests with new features are more than encouraged. Let us all combine our common practices and patterns together. We can always split it later into smaller packages.

Both client and server side.

Installation

meteor add peerlibrary:blaze-common-component

Usage

You can use CommonComponent as a base class for your components and CommonMixin for your mixins.

The idea is that instead of using Blaze global template helpers you can simply use methods shared between all your components by using a common base class for them. In this way interaction between helpers is much cleaner and can nicely tie into the rest of the object-oriented programming.

This package provides some common features community found useful in their components.

The suggested pattern is that in your application your first extend the CommonComponent with an app-level base class for all your components in the app, and then use that app-level base class in your app. Something like:

class AppBaseComponent extends CommonComponent {
  // All app-level methods.
}

class BlogPostComponent extends AppBaseComponent {
  // Your component for blog posts.
}

BlogPostComponent.register('BlogPostComponent');

In this way it is easy to later on add new features app-wide. And remember, if some feature is very useful to you, it will probably be useful to others as well. Consider contributing it to this package.

Available features

See generated documentation for documentation of all features available.

meteor-blaze-common-component's People

Contributors

mitar avatar rclai 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.