Refactor to improve JS output, use Fable.Package.SDK, relax package requirements#3
Open
ArtemyB wants to merge 2 commits intoSelectViewData:mainfrom
Open
Refactor to improve JS output, use Fable.Package.SDK, relax package requirements#3ArtemyB wants to merge 2 commits intoSelectViewData:mainfrom
Fable.Package.SDK, relax package requirements#3ArtemyB wants to merge 2 commits intoSelectViewData:mainfrom
Conversation
- Introduce `Hooks` module with all the hooks moved there instead of being defined in the `React` type. This way, the generated JS is cleaner because module function names aren't mangled. - Move `React` inline type extensions to a separate "Extensions" file. - Remove `Hook` attributes from inline functions for their irrelevance.
- Target .NET 6 instead of .NET 8 to relax package requirements. - Relax "FSharp.Core" dependency to v6. - Introduce "Fable.Package.SDK" package to facilitate project configuration for Fable. - Bump package version to 0.2.1. - [Example] Update "Feliz" to v2.8.0, update Fable to v4.7.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. Refactor hooks to make Fable's JS output cleaner
Hooks defined as static members are prefixed with class name, what makes their names too cluttered. To fix that, I've converted the hooks to module functions. And to preserve the same
React-type static methods API, the type made Erased and all its methods made just as inline wrappers.2. Use
Fable.Package.SDK, relax .NET andFSharp.Corerequirements..NET 8 and
FSharp.Core v8seems unnecessarily high requirements, so I relaxed them to .NET 6 andFSharp.Core v6.