- Install RVM
- Install Ruby
- Install Rails
rails new blog
- Browse the generated code
In this sesction, you'll learn JSX, the concept of React components, and play around with React.
Practice what you learnt by building a board game. You will learn the conecpt of states, and how to compose components.
Now you are familiar with React, you are ready to get started with Flux -- the client-side application architecture from Facebook.
Handlebars.registerHelper('pagination', function(currentPage, totalPage, size, options) { | |
var startPage, endPage, context; | |
if (arguments.length === 3) { | |
options = size; | |
size = 5; | |
} | |
startPage = currentPage - Math.floor(size / 2); | |
endPage = currentPage + Math.floor(size / 2); |