Fork me on GitHub

@franklineapiyo You might have to use a React component for your table @grant.isom Assuming that HTTP work is done by something like re-frame-http which is is an effect So what you do is to overwrite the effect handler so it does nothing


Thanks @U051MTYAB react-table it is then!


So the "event handler" would still produce the effect (please do this HTTP work), but the effect which would normally action that work wouldn't be mocked out to not actually do it


Maybe: also see re-frame-test ? Not that it provides a solution to the exact problem you raise, but it might be adjacent to your requirements. BTW, to mock an effect handler just registering a new effect handler using reg-fx replacing the previously registered effect handler


Anyone know of any work towards integrating dev cards and reframe?


@dpsutton It is not straight forward because of the global state in re-frame Some have worked out a way to break through that via various hacks ... but I'm not sure what they are


Perhaps the easiest way is to isolate the views themseleves from re-frame itself. Ie. do the subscriptions in an "outer" component, and pass in data and callbacks to an inner component, which is re-frame free


Then the inner component is re-frame free (just Reagent) and that can be plonked into devcards.


But this is all theory from me. I've never done it for real


Yeah. Looking at that now. Not sure how it will work out in real life but just seeing if there was anything better


Another fun discovery, when I accidentally created an endless dispatch cycle — very obvious in the graph! 🙂


Not sure if something like this already exists, but I made a couple lightweight macros for decoupling Re-frame subscriptions from Reagent Form-1 component-functions. I've been using them pretty successfully for a couple months now, so I thought I'd share. There's a gif in the readme that I think demonstrates the use-case + usage well.


‘twas interesting indeed! At any rate, please do let me know if you have any further questions/comments/concerns if you do decide to use Peanuts!