These are chat archives for riot/riot

12th
Jun 2015
Carson Wright
@carsonwright
Jun 12 2015 17:02
Anyone still here?
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:02
yep
Carson Wright
@carsonwright
Jun 12 2015 17:03
Is there a way to use observable so that if the trigger has already been called you can just instantly trigger the on event you are setting?
I could just write my own callbacks with event triggers, but the observable way seemed much better
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:04
@carsonwright not in observable..
but promises are supposed to this..
if a promise is already fulfilled it'll instantly be called by success handler
Carson Wright
@carsonwright
Jun 12 2015 17:06
So is there a built in polyfill for promises in riot?
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:07
nups..
i am in process of writting a minimal framework around riot
i have a very small polyfill around promises
lemme know if u need help with it
Carson Wright
@carsonwright
Jun 12 2015 17:12
Thank you
veronica looks really interesting
Are you writing it in straight js?
It almost looks like compiled coffee
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:15
yep...
vanilla js
Carson Wright
@carsonwright
Jun 12 2015 17:15
Looks good
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:15
focusing it on mobile web
Carson Wright
@carsonwright
Jun 12 2015 17:15
I read your explanation in the readme
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:16
so keeping it super lean.. just like riot
Carson Wright
@carsonwright
Jun 12 2015 17:16
Do you have a little more of an explanation for it?
I like that it's lean
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:16
Yep
Carson Wright
@carsonwright
Jun 12 2015 17:16
What does it offer that riot doesn't, I mean I see it offers promises
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:16
m writting a prod app with it..
It offer a push state router..
that eases mounting and unmounting pages
Carson Wright
@carsonwright
Jun 12 2015 17:17
A push state router as aposed to
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:17
accesibility to sensors in a uniform manner
Carson Wright
@carsonwright
Jun 12 2015 17:17
That's cool
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:17
as opposed to hashbang router
Carson Wright
@carsonwright
Jun 12 2015 17:17
Oh
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:17
with riot
Carson Wright
@carsonwright
Jun 12 2015 17:17
What does the push state do?
I've been using page.js
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:18
ur URLS with riot will be like
abc.com/#/page1
abc.com/#/page2
abc.com/#/page3
but with push state
Carson Wright
@carsonwright
Jun 12 2015 17:18
Ah
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:18
SEO friendly
Carson Wright
@carsonwright
Jun 12 2015 17:18
Yeah, I use page.js for routing and it warks like that
works
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:19
also wrapper for AJAX
Carson Wright
@carsonwright
Jun 12 2015 17:19
That's nice, what's it support?
cors?
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:19
for now normal GET/POST
Carson Wright
@carsonwright
Jun 12 2015 17:19
ie8
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:19
so that ppl dont fall to jQuery
yep
IE8
Carson Wright
@carsonwright
Jun 12 2015 17:20
So it does cors as well
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:20
CORS not yet
Carson Wright
@carsonwright
Jun 12 2015 17:20
Ah
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:20
veronica gives DS and SESSION wrapper for SPA
right now DS is over localstorage
but b4 open sourcing we'll move it to indexedDB
Carson Wright
@carsonwright
Jun 12 2015 17:20
Have you written coffee before?
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:21
nahh..
Carson Wright
@carsonwright
Jun 12 2015 17:21
This message was deleted
That's a gist of a ajax client I wrote
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:23
is it promise based?
Carson Wright
@carsonwright
Jun 12 2015 17:23
Kind of
It's got a hacky promise right now that I have to keep in because we have people using it
I plan to change the promises out for a more standardized promise in the next version
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:25
okzz... nice!!!
even i need to check for existing promise support in my polyfill
but need to check does chrome/ff have uniform implementation of same
Carson Wright
@carsonwright
Jun 12 2015 17:26
Oh I just use this no matter what right now
I use tfPromise so that it doesn't colide
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:26
okzz..
but polyfill should act only if necessary
not if browser supports the capability
Carson Wright
@carsonwright
Jun 12 2015 17:27
That's why it's not really a polyfill
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:27
something even we need to do
kk
Carson Wright
@carsonwright
Jun 12 2015 17:27
It operates like promises but not exactly
It acts somewhere in between jquery.deferred() and promise()
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:28
okzz...
so r u using RIOT in any production app?
Carson Wright
@carsonwright
Jun 12 2015 17:30
Yeah
Oh and this is another one you could look at
He did a pretty good job of replacing jquery
And keeping it really lean
I'm using riot in the next version of traitifyjs
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:32
okkk
how's it performing?
Carson Wright
@carsonwright
Jun 12 2015 17:32
Very well
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:32
nice..
Carson Wright
@carsonwright
Jun 12 2015 17:33
How's it been performing for you?
Prateek Bhatnagar
@prateekbh
Jun 12 2015 17:33
even i am using it in our mid sized production app
its AWESOME
95% ~60FPS with veronica & Riot
Carson Wright
@carsonwright
Jun 12 2015 17:34
I don't update that much, and almost any waiting time happens in the requests for data
Which are hundreths of a second, so it seems pretty fast yeah
Carson Wright
@carsonwright
Jun 12 2015 18:32
What do you use to handle your routing on the server side?
@prateekbh
Jens Anders Bakke
@cfenzo
Jun 12 2015 21:04
@prateekbh Veronica looks promising :)
tacone
@tacone
Jun 12 2015 21:58

does Riot converts custom tags to html tags? I've grabbed an example from github and it was all like

<List>
  <ul>
    <ListItem><li>content</li></ListItem>
  </ul>
</List>

Is it normal?

Carson Wright
@carsonwright
Jun 12 2015 22:16
No it doesnt
But you can ignore riot tags and do a riot.mount(".your-class", "your-riot-tag")
That's how I've been using it so I don't have to use an html5 shiv
Works wonderfully
tacone
@tacone
Jun 12 2015 22:26
i don't get the linked example :)
but it's ok, as long as there's a confortable way to avoid the mess
i perhaps will try to put something together and work from there, thank you :)
Carson Wright
@carsonwright
Jun 12 2015 22:29
Alright good luck