React + LiveScript + Pug + SASS

Written by token0x | Published 2017/02/14
Tech Story Tags: javascript | react | livescript

TLDRvia the TL;DR App

I have been working with LiveScript for 5 years and figured out that this is the best language ever made for the web. Of course, I tried other languages like Typescript, CoffeeScript, OCaml, Javascript, Haskell, C#, F# in my previous projects. But finally decided to use LiveScript due to his

  • JSON support
  • pipings
  • pattern matching
  • partial application
  • **OCaml-**like syntax
  • Prelude Library
  • All other functional features

If you familiar with functional development you will love LiveScript.

And most of the time I was working with AngularJS for front-end and was pretty satisfied.

All my friends around who used AngularJS started to use React and provided nice feedback about it but nobody uses LiveScript. They prefer to write in Object-Oriented Style or so lazy to learn.

I decided to try React as well but with a little condition that I will still use LiveScript as my first language.

Finally, I was surprised that LiveScript + React are pretty friendly and I even didn’t exit my comfort zone in order to use it.

More examples here https://github.com/askucher/lsxc

For your better understanding, I do provide the compiled LiveScript into the JavaScript

https://gist.github.com/askucher/8173dc8815dce0df547ef7f3b5c5796e

Install the lsxc library which provides you pug syntax to write React DOM.

This code looks much more elegant and I think Pug/Jade developers will like it.

By the way, Pug/Jade Syntax can be used for other purposes. Not just for React but for Angular Templates as well.

Join and collaborate :)


Published by HackerNoon on 2017/02/14