Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Randall Harmon
    @rjharmon
    also, pivot() can be used, yes
    Javier Marquez
    @arqex
    New updates on freezer! With the latest v0.11.0 it is possible to store class instances inside a freezer's store. They will be handled as leave values by default :#
    YPCrumble
    @YPCrumble
    @rjharmon thanks, very helpful!
    Javier Marquez
    @arqex
    :)
    Randall Harmon
    @rjharmon
    leaf values @arqex ?
    such that nested data structures in by own-properties will be mutable and their changes not tracked
    Bernd Wessels
    @BerndWessels
    Hi, I can't figure out how object references can be preserved between states. Can you have a look at this issue please arqex/freezer#77
    Javier Marquez
    @arqex
    @BerndWessels in a fast look at your code I can see these lines as problematic ones
    state.app.human.set(0, {firstName: 'Bernd'}); state.app.dog.set(99, {name: 'Brutus'});
    See that when you set the first property to the human attribute, you are creating a new state inside your store
    so state is not longer the source of true, since after that set, state!== store.get()
    so the second set can be problematic
    In this particular case dog should be the same in state and store.get
    I'll have a deeper look at the issue when I finish working, and reply to you in github
    Ghost
    @ghost~567889a716b6c7089cbfce6b
    Anyone notice issues with Chrome 51? It may be a red herring, but I suddenly noticed weird behavior in my app using freezer and the only thing I can figure has changed is Chrome. I have a mouse-movement event generating a change to a freezer object. This obviously happens frequently and used to cause frequent update events by the freezer object, but now the updates only seem to tick ~1/second.
    Javier Marquez
    @arqex
    Weird, working for me nicely in Chrome 51.
    I have a svg editor that uses freezer and I can reproduce that kind of frequent updates.
    When working with this kind of real-time apps it's better to initialize your Freezer store in live mode:
    var store = new Freezer({ ...data here...}, {live:true})
    that will make the store to trigger the update event when the update is produced instead of batching the updates and trigger one event with all of them at the next tick.
    @schwiet are you using the live mode?
    Ghost
    @ghost~567889a716b6c7089cbfce6b
    @arqex I wasn't. And initializing to live mode did resolve the symptom I just started seeing, thanks! Any insight into why it worked before without live:true?. Also, note I'm using v0.9.6. Lastly, I've noticed I can only reproduce with mouse events, other frequent updates act as I was expecting. I would think that batching updates between ticks would work just fine, I wonder why I was only seeing ~an update / second.
    YPCrumble
    @YPCrumble
    @arqex thanks again for building this great library! I have a question for you - if you add this to the JSBin is it expected behavior that the "one" property of freezer.b is hidden?
    // Let's create a freezer store
    var freezer = new Freezer({
        a: {x: 1, y: 2, z: [0, 1, 2] },
        b: [ 5, 6, 7 , { m: 1, n: 2 } ],
        c: 'Hola',
        d: null // It is possible to store whatever
    });
    freezer.get().b.set("one", [1, 2, 3]);
    console.log('b is: ');
    console.log(freezer.get().b); // Why doesn't this include `[1, 2, 3]`?
    console.log('b.one is: ');
    // It's like the property is hidden because this returns `[1, 2, 3]` as expected.
    console.log(freezer.get().b.one);
    YPCrumble
    @YPCrumble
    @arqex my understanding is that this happens because b is set to an array, and this method is trying to assign a value to a nonexistent array index ("one"). Perhaps this should return an error rather than the current functionality, telling the user that this method is not possible on the immutable array? I'd be happy to submit a PR if that's helpful.
    Nivedha-Palani
    @Nivedha-Palani
    I got a weird issue. Sometimes, the set function is not working. the value is not updating in Freezer. Still i'm seeing the older value. Please help me to handle this. After this, Even a onclick method is not working
    Nivedha-Palani
    @Nivedha-Palani
    @arqex I got a weird issue. Sometimes, the set function is not working. the value is not updating in Freezer. Still i'm seeing the older value. Please help me to handle this. After this, Even a onclick method is not working