These are chat archives for ractivejs/ractive

17th
May 2016
Arye Shalev
@pantchox
May 17 2016 21:28
@MartinKolarik how do i use it with es6 syntax
?
Martin Kolárik
@MartinKolarik
May 17 2016 21:30
do you mean es6 syntax for classes, es6 inside expressions, or something else?
Arye Shalev
@pantchox
May 17 2016 21:30
mmm yes
import export
i used ractive in the past a lot and i have much love for it. and in my company we write code in es6 style with react and then use that babel shmebel
so i wonder how it is integrating with es6
Martin Kolárik
@MartinKolarik
May 17 2016 21:32
if you use babel to transform import into require, all ractive loaders will work normally
also, you can use rollup with plugin for ractive
Arye Shalev
@pantchox
May 17 2016 21:35
are there any examples out there? :D
the code under "usage" is all you need to import ractive components as normal JS files
Arye Shalev
@pantchox
May 17 2016 21:38
ok its a bit generic but i get it
thanks
:P
Martin Kolárik
@MartinKolarik
May 17 2016 21:39
that's using rollup, but there's a plugin for probably every build system/bundler out there so it depends on what are you using
Arye Shalev
@pantchox
May 17 2016 21:41
i think i may more meant how do you write a ractive es6 class
Martin Kolárik
@MartinKolarik
May 17 2016 21:44
if you mean something like class MyComponent extends Ractive, you don't
still need to use Ractive.extend() for that
Arye Shalev
@pantchox
May 17 2016 21:47
really
thats cool
Martin Kolárik
@MartinKolarik
May 17 2016 21:53
actually, some (if not all) loaders do the extending for you, so you can just import you component definition file and you get a ready-made class
Arye Shalev
@pantchox
May 17 2016 21:53
will try it in the future
i still have a project from start of 2015 i abanded which i want to get back to it made of ractive .. i guess there are super breaking changes now
Martin Kolárik
@MartinKolarik
May 17 2016 21:56
I don't think there were many breaking changes in the latest release, but there sure will be once we get v0.8 out
Arye Shalev
@pantchox
May 17 2016 22:05
thanks
glad to hear ractive is still kicking and alive
:)