This thread is closed but is very important to figure out how the creation of HOCs work. Especially the part where you need to pass the model and the dispatch function through a props object. Maybe put this in the documentation as well? The current example just says:
open Fable.Core.JsInterop
open Fable.Helpers.React
open Fable.Helpers.React.Props
open Fable.MaterialUI.Core
open Fable.MaterialUI.Props
let styles : IStyles list = [
Styles.Root [
CSSProp.BackgroundColor "red"
]
]
let myFun (props : IClassesProps) =
div [ HTMLAttr.Class !!props.classes?root ] []
let withStylesFun = withStyles<IClassesProps> (StyleType.Styles styles) [] myFun
let view () =
from withStylesFun createEmpty []
The example in this thread is much more insightful.
Originally posted by @halcwb in #4 (comment)
This thread is closed but is very important to figure out how the creation of HOCs work. Especially the part where you need to pass the model and the dispatch function through a props object. Maybe put this in the documentation as well? The current example just says:
The example in this thread is much more insightful.
Originally posted by @halcwb in #4 (comment)