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

Provide guidance on functional components #27

Closed
achrinza opened this issue Sep 13, 2024 · 1 comment
Closed

Provide guidance on functional components #27

achrinza opened this issue Sep 13, 2024 · 1 comment
Labels

Comments

@achrinza
Copy link
Contributor

This issue is a breakdown of #26

reagent.core/reactify-component function is used to generate class-based react components from reagent components. This allows reagent components to be used in react components (e.g. React Navigation's navigators).

Although (1) Reagent supports flagging reagent components inside other reagent components to be functional with the [:f> mycomponent] syntax and (2) we have a global-override enabled to cause [:> (class based) to be behave as [:f> (functional), reactify-component ignores the global override flag and does not have a clear functional counterpart for reagent-in-react compatibility:

see: reagent-project/reagent#556
see: reagent-project/reagent#548

However, there is a workaround that's somewhat obscured and implied as deprecated:

see: https://github.com/reagent-project/reagent/blob/fd79a2685e53fcfb71fa68091477f92149c7d0f1/doc/ReactFeatures.md#pre-10-workaround

This issue is to track documenting of the:

  1. Considerations when writing functional components
  2. Different ways (functions, hiccup syntax) for interoping functional components (React-Reagent, Reagent-Reagent, etc.)
@achrinza achrinza added the DevEx label Sep 13, 2024
@achrinza
Copy link
Contributor Author

No longer required due to migration to TypeScript.

see: #37

@achrinza achrinza closed this as not planned Won't fix, can't repro, duplicate, stale Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant