-
-
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
Conversation
d50d5ea to
389db70
Compare
6d5abf3 to
a9a08b9
Compare
a9a08b9 to
2317e7e
Compare
| dispatch: 'msg -> unit | ||
| loggingArgs: LoggingViewModelArgs } | ||
| type ViewModelArgs<'model, 'msg> = | ||
| internal { initialModel: 'model; dispatch: 'msg -> unit; loggingArgs: LoggingViewModelArgs } |
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.
Please keep each field on it's own line. In particular, this will keep the diff smaller.
| { initialModel: 'model | ||
| dispatch: 'msg -> unit | ||
| loggingArgs: LoggingViewModelArgs } | ||
| type ViewModelArgs<'model, 'msg> = |
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.
| let simple initialModel = | ||
|
|
||
| let createWithoutLogging initialModel dispatch = |
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.
| dispatch = dispatch | ||
| loggingArgs = LoggingViewModelArgs.none } | ||
|
|
||
| let simple initialModel = createWithoutLogging initialModel ignore |
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.
2317e7e to
2cdf62e
Compare
2cdf62e to
f55b2f4
Compare
|
Closing per @TysonMN 's request to make this change as part of a larger one. |
Adding a
createWithoutLoggingfunction that can be used outside the project for view model args (simplewill be used for design time view models) - could be useful for debugging purposes.TODO: rename to
createafter renaming the internal one tocreateWithLoggingbut only after #489 and #475 are merged in (they conflict with that)