fable-react icon indicating copy to clipboard operation
fable-react copied to clipboard

open statements lead to react error

Open whitetigle opened this issue 7 years ago • 6 comments

Hi, just stumbled on this problem:

this does not work

  open Fable.Recharts
  open Fable.Recharts.Props
  module SVG = Fable.Helpers.React.Props
  open Fable.Helpers.React

and leads to this error:

warning.js:33 Warning: React does not recognize the dataKey prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase datakey instead. If you accidentally passed it from a parent component, remove it from the DOM element.

meanwhile this works

  open Fable.Recharts
  open Fable.Recharts.Props
  module SVG = Fable.Helpers.React.Props
  // open Fable.Helpers.React

maybe something with modules loading?

whitetigle avatar Jul 13 '18 14:07 whitetigle

BTW: Fable 1.3.17

whitetigle avatar Jul 13 '18 14:07 whitetigle

That's weird, Fable doesn't do anything for opening statements. Maybe the last opening is shadowing something from Recharts, does this work?

  open Fable.Helpers.React
  open Fable.Recharts
  open Fable.Recharts.Props
  module SVG = Fable.Helpers.React.Props

alfonsogarciacaro avatar Jul 13 '18 15:07 alfonsogarciacaro

Seems like DataKey is defined only in recharts bindings. Perhaps you used it on an HTML element ?

MangelMaxime avatar Jul 13 '18 15:07 MangelMaxime

I ran into the same problem where ordering of the open statements was preventing my chart for recharts from being rendered with the same error message. Should this issue be referenced from this repo?

swrhim avatar Dec 01 '20 03:12 swrhim

Yes, that may be a good idea. Maybe opening an issue in fable-rcharts with a descriptive title that references this one. What Fable version are you using btw?

alfonsogarciacaro avatar Dec 01 '20 14:12 alfonsogarciacaro

Version 3. I'm using the latest SAFE template before .net 5 was announced. (not sure if that has something different)

swrhim avatar Dec 01 '20 19:12 swrhim