Open amitaibu opened 1 year ago
Not sure this can be done in a way that generalizes well because a New...Action
can always have different parameters (in your case Id LandingPage
). I'd wait for a bit more code and then extract it into the framework once it's more clear what can be generalized here 👍
@mpscholten In my use case I have several New..Action
the take the same param. I think it's quite typical that there's some central record ID (e.g. groupId
) that others are referencing.
With that said, my issue is also in a case I remove the New..Action
-- https://github.com/amitaibu/ihp-landing-page/pull/26#discussion_r1293971589
So my idea for the doc isn't to move code to IHP core, but to explain how to generalize functions that work with multiple records/ actions -- that share the same constraints.
I've simplified the test to only deal with Create..Action
. I can't figure out what the compiler means by No instance for (Typeable landingPageId0)
So my idea for the doc isn't to move code to IHP core, but to explain how to generalize functions that work with multiple records/ actions -- that share the same constraints.
Makes sense, got it 👍
I've simplified the test to only deal with Create..Action. I can't figure out what the compiler means by No instance for (Typeable landingPageId0)
I've tried this for a couple of minutes, but could not figure out what is wrong specifically. It's very tricky
@mpscholten This is something I keep needing on tests, so I think could be a nice addition to the guide. But I'd need some help here :)