Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrating to composable-functions #248

Open
jacksonhyde opened this issue Oct 31, 2024 · 3 comments
Open

Migrating to composable-functions #248

jacksonhyde opened this issue Oct 31, 2024 · 3 comments

Comments

@jacksonhyde
Copy link

jacksonhyde commented Oct 31, 2024

I've tried following the incremental steps in the CF migration guide in a basic remix-forms implementation - mainly just swapping out makeDomainFunction for applySchema. However PerformMutationProps types the mutation as a DomainFunction, and there isn't sufficient overlap to cast in a ComposableWithSchema.

I may be missing something obvious, but given composable-function is the new hotness are there any plans to migrate remix-forms to work with composable-functions out of the box?

@jacksonhyde jacksonhyde changed the title Migrating to composeable-functions Migrating to composable-functions Oct 31, 2024
@gustavoguichard
Copy link
Contributor

Hey @jacksonhyde , I'm glad you're using composable-functions!
The deal with remix-forms is that it is in feature freeze until the Remix - or React Router - folks finally launch the new version with RSC and new features so we'll have a new improved paradigm to keep working on this library. In the meantime we haven't been updating it much.
That said, in our internal projects we've been using remix forms with composable functions and so we published an experimental version of remix-forms which is the same thing you see here but adapted to work with composable-functions. If you're feeling adventurous you might want to try: [email protected]
Notice we didn't need to publish more features since June 5th which means it's been stable enough for our needs. If you decide to go on that route feel free to reach out to me if you experience any trouble on that release!
Cheers

@jacksonhyde
Copy link
Author

Thanks @gustavoguichard - that sounds sensible, and thanks for sharing that experimental version. We'll definitely give it a go!

@diogob
Copy link
Contributor

diogob commented Oct 31, 2024

@jacksonhyde another possibility is using the composable-functions shipped within domain-functions 3.3.0.

If you import

import { Future, fromComposable, toComposable } from 'domain-functions'

Then you have all composable-functions module in Future and functions to convert back and forth between DomainFunction<T> and ComposableFunction<(input?: unknown, environment?: unknown) => T>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants