React + LiveScript + Pug + SASS

Andrey Stehno
HackerNoon.com
Published in
3 min readFeb 14, 2017

--

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 :)

Hacker Noon is how hackers start their afternoons. We’re a part of the @AMI family. We are now accepting submissions and happy to discuss advertising & sponsorship opportunities.

If you enjoyed this story, we recommend reading our latest tech stories and trending tech stories. Until next time, don’t take the realities of the world for granted!

--

--