-
-
Notifications
You must be signed in to change notification settings - Fork 72
Make view model args partly public #507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,13 +27,11 @@ module internal LoggingViewModelArgs = | |
| nameChain = "" } | ||
|
|
||
|
|
||
| type internal ViewModelArgs<'model, 'msg> = | ||
| { initialModel: 'model | ||
| dispatch: 'msg -> unit | ||
| loggingArgs: LoggingViewModelArgs } | ||
| type ViewModelArgs<'model, 'msg> = | ||
| internal { initialModel: 'model; dispatch: 'msg -> unit; loggingArgs: LoggingViewModelArgs } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please keep each field on it's own line. In particular, this will keep the diff smaller. |
||
|
|
||
| module internal ViewModelArgs = | ||
| let create initialModel dispatch nameChain loggingArgs = | ||
| module ViewModelArgs = | ||
| let internal create initialModel dispatch nameChain loggingArgs = | ||
| { initialModel = initialModel | ||
| dispatch = dispatch | ||
| loggingArgs = LoggingViewModelArgs.map nameChain loggingArgs } | ||
|
|
@@ -42,8 +40,10 @@ module internal ViewModelArgs = | |
| { initialModel = v.initialModel |> mapModel | ||
| dispatch = mapMsg >> v.dispatch | ||
| loggingArgs = v.loggingArgs } | ||
| let simple initialModel = | ||
|
|
||
| let createWithoutLogging initialModel dispatch = | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keep this internal for now. Make in public in the PR that needs that. |
||
| { initialModel = initialModel | ||
| dispatch = ignore | ||
| dispatch = dispatch | ||
| loggingArgs = LoggingViewModelArgs.none } | ||
|
|
||
| let simple initialModel = createWithoutLogging initialModel ignore | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keep this internal for now. Make in public in the PR that needs that. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep this internal for now. Make in public in the PR that needs that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This essentially undoes this PR. I'll just close it until we implement static view models, which will need it.