> In react you simple do: 
> <CommentBox url="/api/comments" pollInterval={2000} /> 

You don't *simply* do that in React. The above assumes you have created a 
React component that takes "url" and "pollinterval" props and then after 
being mounted starts making periodic Ajax requests and updates the state 
after each fetch. Of course, you can do the same thing in Vue -- just make 
a component that takes those same two props and set up the Ajax polling 
inside the "mounted" lifecycle hook (and update a "comments" data property 
on each fetch, which will trigger a re-render). It might look something 

<comment-box url="/api/comments" :poll-interval="2000"></comment-box>


- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to