Fork me on GitHub

I'm having trouble using a local ratom in a component, much in the same way as the todo-input does with its title in the todomvc example ( In a component, I have an input that mutates the ratom and can dispatch an event to update the original prop in the app-db. All of that works fine, but when the component is re-rendered, the ratom doesn't get re-created and the component ends up displaying nothing. Other sibling components getting data from a parent's subscription show the new value just fine Apologies if this is more suitable being directed to #reagent


@zak my guess is this is form-1 vs form-2 view issue. In a form-2 component the inner function which is being returned is what is will be rendered and the stuff above it will only be called once. You could place your atom creation inside that function or switch to a form-1 by returning the hiccup instead of a function that returns hiccup.


I did try moving the ratom let binding into the form-2 inner fn, but it didn't seem to have any effect. The todomvc example uses form-2 and has the ratom binding wrapped around the inner fn, so I'm not sure why that works. For now, I've had success wrapping my inner fn in [], but I really don't see why that's working


Though the purpose of local ratoms is to persist state across renders, but doesn't need to be in db. By wrapping with [] your converting the form-2 to form-1 because the result is now hiccup.


Can we call apps written in re-frame and posh to be progressive web apps? there seems to be similarities?


@rnandan273 I don't see what your choice of libraries has to do with progressive web apps? The way I understand the term, it just means web apps that feel like they're native.


You certainly can use the libraries you mentioned to build something you could call a PWA, but you can also build stuff that you wouldn't call a PWA 🙂