-
Notifications
You must be signed in to change notification settings - Fork 316
Open
Labels
Description
Description
According fable-compiler/fable-react#243, it looks like if a method use [<ParamList>] and we provide an empty array to it.
Then when consumed from the same project / file it will not generate the empty array arguments.
But when consumed from a referenced project (via NuGet at least) it will have the empty array generated.
Repro code
open Fable.Core
type ReactElement = obj
type IReactExports =
/// Create and return a new React element of the given type. The type argument can be either a tag name string (such as 'div' or 'span'), a React component type (a class or a function), or a React fragment type.
abstract createElement: comp: obj * [<ParamList>] children: ReactElement seq -> ReactElement
// abstract createElement: comp: obj * props: obj -> ReactElement
let react : IReactExports = unbox null
let inline voidEl (tag: string) : ReactElement =
react.createElement(tag, [])
voidEl "br" |> ignore// From same project
react.createElement("br");
// From referenced project
react.createElement("br", []);We should look to always generate react.createElement("br");.
Related information
- Fable version: 4.18.0
- Operating system: Repl
kentcb