Skip to content
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

♻️ Update to TCA 1.2.0 syntax #5

Merged
merged 3 commits into from
Oct 25, 2023
Merged

♻️ Update to TCA 1.2.0 syntax #5

merged 3 commits into from
Oct 25, 2023

Conversation

yermukhanbet
Copy link
Contributor

  • Change ReducerProtocol to Reducer
  • Add observer to ViewStateOf init
  • Change PreviewProvider to macro

Comment on lines 33 to 36
let store: StoreOf<___VARIABLE_productName:identifier___> = .init(
initialState: .init(),
reducer: { ___VARIABLE_productName:identifier___() }
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the global variable store is only for preview,
I think It's better to wrap in #if DEBUG
or inline in ___FILEBASENAMEASIDENTIFIER___(store: ....)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since some might not use #if DEBUG flags, moved init to inline:
ef4285

Copy link
Contributor

@tisohjung tisohjung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@yermukhanbet yermukhanbet merged commit 323738b into main Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants