Skip to content

Felizv3#29

Open
Sagensagen wants to merge 9 commits intosydsutton:masterfrom
Sagensagen:felizv3
Open

Felizv3#29
Sagensagen wants to merge 9 commits intosydsutton:masterfrom
Sagensagen:felizv3

Conversation

@Sagensagen
Copy link
Copy Markdown
Contributor

Migrates from Feliz 2.x to Feliz 3.2.0, updating internal APIs
that were removed or changed in Feliz 3.

Feliz 3.x compatibility

  • Replace Interop.reactApi.Children.toArray with Array.ofSeq across Props.fs,
    Props2.fs, and FelizProps.fs (18 occurrences)
  • Replace Interop.mkAttrPropHelper.mkAttr and Interop.mkStyle
    StyleHelper.mkStyle in the FelizOverloads module
  • Add Interop.reactElementWithChildren helper to Utils.fs

Fix createElement children handling

  • FuiHelpers.createElement now extracts children from props and passes them
    as spread arguments to React.createElement, matching how Feliz 3.x handles it.
    Uses Feliz.HtmlHelper.extractByKeyFast for extraction.
  • This fixes React "missing key" warnings that occurred because children were
    being passed as an array inside the props object.
  • Fix TeachingPopoverTrigger Fragment runtime error by using
    reactElementWithChildren instead of createElement with prop.children.

Fable 5 compatibility

  • Replace interpolated string imports in BundleIcons.fs and FluentUI.fs icon
    imports with importAll + emitJsExpr dynamic access, since Fable 5 requires
    string literals for import.

Feliz 3.x + fable 4.x had some breaking changes, and required either to add aNoWarn NU1605, or to upgrade to fable 5 prerelease. Therefore took a long shot and went with Fable 5 since it seems it is maturing.

It works perfectly fine with fable 4 as well, if stable fable version is preferred.

Package updates

  • Feliz 2.x → 3.2.0
  • Added Fable.Core 4.5.0
  • V8toV9: removed Interop.reactApi.Children.toArray, uses Array.ofSeq

@Sagensagen Sagensagen marked this pull request as ready for review April 5, 2026 18:31
@Sagensagen Sagensagen mentioned this pull request Apr 5, 2026
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

Successfully merging this pull request may close these issues.

1 participant