I no longer mantain this list. There are lots of other very comprehensive JavaScript link lists out there. Please see those, instead (Google "awesome JavaScript" for a start).
import { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |
In React's terminology, there are five core types that are important to distinguish:
React Elements
I feel the need to have a little rant about MooTools and ES7 and the whole 'Array.contains' hoo-hah.
When MooTools came out in 2006, the most popular framework was Prototype. As the name suggests, it extended prototypes, as did MooTools. People still referred to making websites with JavaScript as 'DHTML', there was no trim method on strings, there wasn't even a forEach method on arrays. JavaScript was a crippled language. IE6 ruled the waves.
MooTools, Prototype, Dojo, Base2 - they made the language usable, even fun, to work with. By using an incredible feature of JavaScript, prototypical inheritance, we were able to add features to the language that made it palatable.
Be it simple methods like number.toInt, string.trim, array.forEach, or familiar programming constructs such as Class, MooTools and its ilk took JavaScript from something impossible to work with to something that you could properly use to build awesome sites, and even apps - Microsoft, IE and desktop ruled everything, and the concept of a 'we
#Using Font-Awesome with Rails 3.1 using CSS
-
Download font-awesome from https://github.com/FortAwesome/Font-Awesome
-
Put the font folder in the app/assets. I renamed the folder from font to fonts to make it clearer
-
Add
config.assets.paths << "#{Rails.root}/app/assets/fonts"
toconfig/application.rb
. This is to include the apps/assets/fonts folder in the asset pipeline -
Put the font-awesome.css file in the app/assets/stylesheets folder
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
In the project I'm working on we wanted to have a Category model which we wanted to be nestable. But we also liked the user to have a draggable interface to manage and rearrange the order of his categories. So we chose awesome_nested_set for the model and jQuery.nestedSortable for the UI.
It took me some time to arrange things to work properly so I wanted to share my work in case it helps anybody.
you might want to take a look at a demo app
- go to: http://awesomenestedsortable.heroku.com/groups/
- click in show of any group
/* | |
* Containing floats in a consistent manner | |
* By Jonathan Neal and Nicolas Gallagher | |
*/ | |
/* | |
* New block formatting context method | |
* IE 6+, Firefox 2+, Safari 4+, Opera 9+, Chrome | |
*/ |
gem 'compass', '0.10.2' | |
gem 'compass-960-plugin', :require => 'ninesixty' | |
gem 'haml', '3.0.10' |