Open minimapletinytools opened 4 years ago
If it brings in too many extra deps we could perhaps make it a "sub library" in the same package.
I switched over to copy of this test code for my own stuff and added my own functionality which I think would be very useful for others. Would it be helpful if I made a PR where this module + my additions is moved into the main one?
EDIT: I made a package reflex-test-host that contains my additions.
The main addition was splitting up runApp
into getAppFrame
which outputs an AppFrame
and
tickAppFrame :: (t ~ SpiderTimeline Global, m ~ SpiderHost Global)
=> AppFrame t bIn eIn bOut eOut m
-> Maybe (These bIn eIn)
-> m [(bOut, Maybe eOut)]
which allows you to tick/profile each frame individually.
@Ericson2314 doesn't seem like it will bring in any new deps
created a PR: https://github.com/reflex-frp/reflex/pull/450
The Test.Run module is useful for testing reflex apps as well.
Exposing this test module encourages more modular design where view/controller is cleanly separated from state. For a new reflex developer, finding information on how to test an app w/out rendering it in reflex-dom was a major challenge. Before discovering this, I forked reflex-basic-host and making my own version which is almost identical to whats in Test.Run https://github.com/pdlla/reflex-basic-host
On the plus side I now completely understand how reflex hosts are built. But I think this information should be easier for new developers to find. TBH I'd like to see this documented in quickref.
Also thanks for making such a great package!