Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Derek Reynolds
    @derekr
    cool stuff :D
    react.renderToStaticMarkup is averge 10-20ms latency
    though i am not proficient w/ benchmarking tools so this may be off base
    Anthony Short
    @anthonyshort
    oh wow that’s awesome :)
    Would be good to get some perf tests into a repo somewhere
    Derek Reynolds
    @derekr
    yeah i'm about to push what i have now… it's pretty basic haha
    just wanted to do some quick comparisons
    Anthony Short
    @anthonyshort
    There’s this too: http://anthonyshort.me/dbmonster/
    There’s a React one around too, I think Deku is getting ~16 fps, React gets ~12 fps
    I mean, it’s not exactly realistic, but it’s kinda nice to get an idea for performance
    Derek Reynolds
    @derekr
    oh yeah that's rad
    i think that was used in a talk at react conf
    bruce
    @sqram
    Deku doesn't have a router nor a built-in way to make async requests does it?
    Anthony Short
    @anthonyshort
    Depends what you're trying to do. Deku is really just there to render the vnodes. What problem are you having?
    bruce
    @sqram
    @anthonyshort No problems. I am going around looking at vdom libraries. I have used Mithril in the past, which comes with a builtin router and method for making async requests. So far, it's only one of the few I see that does it (riot.js and react being the others). Suppose I could include a small ajax library or make my own, but that's why i asked, to see if i have to :)
    bruce
    @sqram
    What exactly are 'propTypes' ? Cannot find that in the documentation anywhere.
    Kelly Miyashiro
    @kmiyashiro
    I believe those are to define the properties
    bruce
    @sqram
    Is there no doc to let us know what keys/values can go in there?
    Anthony Short
    @anthonyshort
    There's not much documentation on it because it was something we were trying out. It's going to get pulled out in the next version so it's not in core. Any validation library can do the same thing but better.
    bruce
    @sqram
    @anthonyshort understood. thanks.
    Anthony Short
    @anthonyshort
    @sqram related: dekujs/deku#176
    but yeah, the docs are kinda shitty in general at the moment
    bruce
    @sqram
    That's alright.
    I spent all of this past weekend trying all these vdom libraries popping out, decided to stick with deku for a personal project. Hope it sticks around
    Anthony Short
    @anthonyshort
    Yeah it definitely will, we’re using it for all of our app at Segment
    So we’re actively developing it and relying on it now :)
    bruce
    @sqram
    hah. no better way to keep a project alive than to use it in production
    bruce
    @sqram

    I have more of a organization question when using routes. Currently i have a main.js file. I also have a modules folder, and a components folder
    I organize it in this fashion: in main.js i import modules, which in turn import components. The route defines which module to load. Minimal exmaple here: http://tabbit.org/MKPhrs

    just wondering if this is awful or acceptable. I didn't see a community example with routes, so i gotta ask.

    Anthony Short
    @anthonyshort
    Nope that’s a perfectly fine way to do it. We do something similar, but we also load data on the routes too
    bruce
    @sqram
    @anthonyshort ah thanks. i try to keep the routes minimal (coming from mithril, btw)
    Anthony Short
    @anthonyshort
    Ah cool.
    Curious to see what you end up with too
    bruce
    @sqram
    follow up question - how would you use/pass the app variable so it can be used inside a module? (ie, if i need to .set() on it) . I suppose I could use window.app but don't think that's the best way
    Anthony Short
    @anthonyshort
    We use app.use(fn)
    so the module is just a function that accepts the app
    so like...
    app.use(projectsAPI)
    function projectsAPI(app) { … }
    Then we can share that around like a plugin
    bruce
    @sqram
    great. thanks!
    bruce
    @sqram
    This message was deleted
    Daniel Sont
    @ds0nt
    hey all

    @anthonyshort share around projectsAPI as a plugin?
    as in export function projectsAPI(app) { }

    import projectsAPI from '../plugins/projects'

    @anthonyshort share around projectsAPI as a plugin?
    as in
    export function projectsAPI(app) { }
    import projectsAPI from '../plugins/projects-api'
    ?
    Daniel Sont
    @ds0nt
    would you suggest initializing the plugins when bootstrapping everything?
    javascript app.use(a); app.use(b); app.use(c);
    would you suggest initializing the plugins when bootstrapping everything?
    app.use(a);
    app.use(b);
    app.use(c);
    There's not much documentation on it [propTypes] because it was something we were trying out. It's going to get pulled out in the next version so it's not in core. Any validation library can do the same thing but better.
    +1
    @anthonyshort I detest slack channels. The gitter is good. Slack I find to be too casual and time-wasting
    Daniel Sont
    @ds0nt
    @6D65 Browserify.
    Duojs is hard to configure, and doesn't manage things well, chokes on github downloads. It's a timesink. Duojs does more harm than good. IMO