Skip to content

Cannot assign [Post] to IdentifiedArrayOf<Post> #34

Answered by dadixon
dadixon asked this question in Q&A
Discussion options

You must be logged in to vote

`struct PostsState: Equatable {
var posts: IdentifiedArrayOf = []
}

switch action {

case let getPosts(posts):
state.posts = posts
}

let posts = [
PostState(id, other values),
PostState(id, other values),
PostState(id, other values)
}`

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@stephencelis
Comment options

@dadixon
Comment options

Answer selected by dadixon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants