Git Product home page Git Product logo

frontend-hyperpolyglot's People

Contributors

crisward avatar cryrivers avatar ebidel avatar erikras avatar insin avatar jeffcarp avatar just-boris avatar limi avatar locks avatar mattheworiordan avatar shvaikalesh avatar trek avatar

Stargazers

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

Watchers

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

frontend-hyperpolyglot's Issues

Ember: move on up

Ember is (probably?) more widely used than Polymer and Vue. The order should be:

React Angular 2 Angular 1 Ember Polymer Vue

Code error/typo for Polymer at "Prop validate Object"

There's an error (or maybe just a typo) at line Prop validate Object for Polymer. It's written :

properties: {
  myObj: {type: Number}  
}

But it should be :

properties: {
  myObj: {type: Object}
}

Also I don't know if the author knows but it could be shortened to just :

properties: {
  myObj: Object
}

The four previous lines can be shortened to.

Very nice work btw. Very helpful.

`shape` and custom PropType validation for react

Shape

React will allow you to specify the shape of an object prop, this is an example:

var Comp = React.createClass({
  propTypes: {
    name: React.PropTypes.shape({
      first: React.PropTypes.string.isRequired,
      last: React.PropTypes.string
    }).isRequired
  },
  render() {
    return <div>Hello</div>;
  }
});

ReactDOM.render(<Comp name={{ first: "James" }}/>, document.querySelector('#root'));

I'm not sure if this is something allowed by other frameworks, but it's a pretty good feature.

Custom PropType Validation

React offers functionality to add a custom prop validator, which again is a good feature, for example you might want to do hex code validation. Again, not sure if this is something unique to React, but it's a nice feature.

Section on passing components as content

I only have experience with React and Vue here (and Vue 2 may set the cat amongst the pigeons in feature comparisons when it also adds render() methods), so some examples of the sort of thing I mean.

React

http://facebook.github.io/react/docs/multiple-components.html#children
http://facebook.github.io/react/docs/top-level-api.html#react.children
https://discuss.reactjs.org/t/children-as-a-function-render-callbacks/626 - "render callbacks"

Placing all child contents

MyComponent#render():

<div>Before {this.props.children} After</div>
<MyComponent><p>Child 1</p><p>Child 2</p></MyComponent>

Passing rendered elements as props

MyComponent#render():

<div>
  {this.props.foo}
  {this.props.children}
  {this.props.bar}
</div>
<MyComponent bar={<p>Bar</p>} foo={<p>Foo</p>}>
  <p>Child 1</p><p>Child 2</p>
</MyComponent>

Dynamic component as a prop

MyComponent#getDefaultProps():

return {someProp: 'div'}

MyComponent#render():

<this.props.someProp>...</this.props.someProp>
<MyComponent/>
<MyComponent someProp={SomeOtherComponent}/>

Vue

https://vuejs.org/guide/components.html#Content-Distribution-with-Slots

Placing all child contents

MyComponent template:

<div>Before <slot></slot> After</div>
<my-component><p>Child 1</p><p>Child 2</p></my-component>

Named slots

MyComponent template:

<div>
  <slot name="foo"></slot>
  <slot></slot>
  <slot name="bar"></slot>
</div>
<my-component>
  <p slot="bar">Bar</p>
  <p slot="foo">Foo</p>
  <p>Child 1</p><p>Child 2</p>
</my-component>

Not two way data binding on Polymer?

I think Polymer does support two way data binding by using curly braces instead of square ones:

<child-component prop1="{{ parentProp }}"></child-component>

Hope @ebidel or anyone from the Polymer team can confirm this.

Add Aurelia

We'd love to see Aurelia added to this list. It's quite popular and our team would be happy to help fill out the chart.

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.