Skip to content

Fix for "Your first feature" tutorial Store type mismatch in #Preview #3688

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

Closed
wants to merge 1 commit into from

Conversation

jrhey
Copy link

@jrhey jrhey commented May 17, 2025

The tutorial uses Store(...) to initialize the CounterFeature store, which leads to a type mismatch error in the latest versions of TCA.

Screenshot 2025-05-17 at 19 15 02

This commit updates the tutorial code to use the explicit generic form StoreOf<CounterFeature>(...)

@mbrandonw
Copy link
Member

Hi @jrhey, are you sure you don't have another type in your project named Store? Or perhaps something else is off in your project, because the stated way in the tutorial is the way to initialize a store. You can see we have hundreds of examples of this throughout the repo that compile just fine:

https://github.com/search?q=repo%3Apointfreeco%2Fswift-composable-architecture+%22Store%28initialState%22&type=code

If you can share a repro of this problem we will take a closer look.

@jrhey
Copy link
Author

jrhey commented May 17, 2025

@mbrandonw ah my mistake! You're right, I did have a StoreKit Store in this project already. I'll close this PR 👍

@jrhey jrhey closed this May 17, 2025
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.

2 participants