Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    dontwork
    @dontwork
    so its probably a worthless pursuit to develop m.request to an isomorphic solution?
    brb lunch
    Stephan Hoyer
    @StephanHoyer
    but building a server-side m.request should't be that big of deal I think
    dontwork
    @dontwork
    Do you think it would be a welcome addition
    pretty neat
    maybe i'll add this to the isomorphic example
    dontwork
    @dontwork
    Sweet!
    dontwork
    @dontwork
    thanks for that @StephanHoyer pretty simple drop in!
    Im using it!
    Stephan Hoyer
    @StephanHoyer
    👌
    Stephan Hoyer
    @StephanHoyer
    updated and simplified version of mithril-isomorphic-example just git published
    now with m.request running server and client side, so no need for a store facade, thanks @dontwork for the inspiration
    dontwork
    @dontwork
    😊
    Hendrik Roth
    @HendrikRoth
    +1
    Stephan Hoyer
    @StephanHoyer
    StephanHoyer/mithril-isomorphic-example@ce6e67c
    dontwork
    @dontwork
    @StephanHoyer do you still have the example where you hooked up the server-rendering straight to the api code rather than using the polyfill?
    Stephan Hoyer
    @StephanHoyer
    just look at the history
    Ben Chauvette
    @bdchauvette

    Howdy @StephanHoyer! Apologies for the text dump, but I figured I'd reach out on gitter before opening a bunch of issues on github.

    I have some free time this weekend, and I'd like to help out with mithril-node-render (and work towards some hacktoberfest swag :sweat_smile:).

    If you're interested in any of the following ideas, I'll open some issues for more discussion, then I can work on some PRs:

    1. Make the new isClass function match how Mithril itself checks for class components: i.e. classes don't have to actually use class syntax, they just need to be functions that have a view method on their prototype. This would simplify the check, and prevent possible incompatibilities between mithril and mithril-node-render.

    2. Move mithril to a peerDependency: This is how react-dom and React Native handle their depedency on React, and would help prevent issues like #58 in the future. I imagine most users consuming this module probably already have mithril installed as a dependency, so you wouldn't run into the peerDependency hell that you do with e.g. eslint plugins and presets.

    3. Update documentation a bit: There's a few minor grammar hiccups, and a couple areas that I think could use a bit more clarification (e.g. escaping).

    4. Switch from co to async/await: this would be a breaking change and would only work on node >=8, but it would remove the dependency on co and I think make the code slightly more idiomatic.

    5. Implement #65: I feel like this would be a pretty big change, but I could take a stab at implementing it as e.g. renderSync. With async/await becoming more mainstream, though, I don't know how relevant this still is?

    Stephan Hoyer
    @StephanHoyer
    1-4 :thumbsup:
    5. I thought about a simple vdom2html converter that doesn't have component support, that might be enought for the mentioned usecase
    Feel free to try some things
    Greatly appreciate your efforts
    Cory Mawhorter
    @cmawhorter

    it might be worthwhile to mention in the readme. it seems browserMock can break the node stripe lib; maybe others. seems to be promise related.

    i didn't investigate too deeply, but stripe promises no longer return after using mithril node render (and browserMock)

    Stephan Hoyer
    @StephanHoyer
    that's odd
    Nguyễn Quang Huy
    @huystart17
    @StephanHoyer Hi, i am trying mithril node-render

    @huystart17
    i find that ok

    const LayoutOneColumn = {
        oninit: v => {
            v.state.text = s('Hello');
            console.log(v.children);
        },
        view: v => m('.container', m(TopBar), m(Header), m('div', v.state.text), v.children),
    };

    that got error

    const LayoutOneColumn = {
        oninit: v => {
            v.state.text = s('Hello');
            console.log(v.children);
        },
        view: v => m('.container', [m(TopBar), m(Header), m('div', v.state.text, v.children)]),
    };

    may be it not understand nest children

    and i got error when i trying nest v.children, like above
    v.children ===[ { tag: '#',
        key: undefined,
        attrs: undefined,
        children: '',
        text: undefined,
        dom: undefined,
        domSize: undefined,
        state: undefined,
        _state: undefined,
        events: undefined,
        instance: undefined,
        skip: false } ]
    error:  TypeError: Cannot read property 'toLowerCase' of undefined
        at _render (/home/huyhuy17-site/WORK/uApp/node_modules/mithril-node-render/index.js:204:66)
        at _render.next (<anonymous>)
        at onFulfilled (/home/huyhuy17-site/WORK/uApp/node_modules/co/index.js:65:19)
        at <anonymous>
        at process._tickCallback (internal/process/next_tick.js:182:7)
    and i trace it, can you help me
    Please help me . thank
    Stephan Hoyer
    @StephanHoyer
    what is s(...)
    and what is TopBar and Header
    Nguyễn Quang Huy
    @huystart17
    s = require('mithril-stream')
    TopBar and Header are just view component (but i has remove its code ).
    But when i try , i found that v.children inside some nest component , i got error
    Nguyễn Quang Huy
    @huystart17
    Thank you , i think it is my problem , when using mithril-stream, and i already solve it
    Stephan Hoyer
    @StephanHoyer
    :thumbsup:
    Alfeardo
    @alfeardo
    hi all
    Stephan Hoyer
    @StephanHoyer
    👋
    Samuel
    @SamuelBambu
    Hey, a little question i want to autofocus an input on render? how can i aproach this?
    Stephan Hoyer
    @StephanHoyer
    see mithril chat
    mmuratori
    @mmuratori
    Hi! Anyone can help me?
    I'm getting this while I'm trying to render a closure component view.tag.toLowerCase is not a function
    Stephan Hoyer
    @StephanHoyer
    Code?
    gaber mowiena
    @GaberMowiena
    Hi Mithrilers! im new to mithril, and i was following the tutorial to learn about the XHR and when i make a PUT request to the mock API "REM" it gives me an error in the console as 400 bad request and another error "request.js?d40f:130 Uncaught (in promise) Error: [object Object]
    at XMLHttpRequest.xhr.onreadystatechange ". I thought maybe REM is old and doesnt work so i tried the same url in postman but it worked. any thoughts on that?!
    Stephan Hoyer
    @StephanHoyer
    Please ask in the main mithril channel
    gaber mowiena
    @GaberMowiena
    Ok thank
    Jim Hessin
    @jhessin
    Is there any plans for typescript support for this project?
    Stephan Hoyer
    @StephanHoyer
    Feel free to add some annotations. Shouldn't be too hard.