Closed Montana closed 3 years ago
Not sure if that's the problem, but please make sure you're using the latest library version. Looking at the open statements it seems you're using Fable.Import.Browser which is deprecated, please use Fable.Browser.Dom instead (latest Fable.React already includes it as a dependency).
// Access DOM global values like window, document, etc
open Browser
// Access DOM types likes KeyboardEvent, etc
open Browser.Types
If this doesn't help can you please tell us:
Tried:
Fable.Browser.Dom
Worked! Seems like I've ran into the deprecated issue before - gotta keep on it. Thank you @alfonsogarciacaro!
I am trying to write a React component in F# with Fable, and I'm having trouble referencing the necessary libraries. The compile errors I'm getting are as follows:
The namespace 'React' is not defined. ('open' statements). The type PureStatelessComponent is not defined.
Here is my code currently, seen a similar thread, but the solution offered in that did not work:
I appreciate any help, thank you.
-Montana Mendy