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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |