You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's confusing about this lesson?
It suggests to use push mutating-op in order to assemble the result,
mutations are evil,
perhaps it can be suggested to use recursion?
Resulting function would be something of this sort:
const traversePosts = async (cid) => {
// Your code goes here
postGetResult = await ipfs.dag.get(cid)
post = postGetResult.value
return !post.prev ? [cid] : [cid, ... await traversePosts(post.prev)]
}
The text was updated successfully, but these errors were encountered:
URL of the lesson that's confusing:
https://proto.school/blog/07
What's confusing about this lesson?
It suggests to use
push
mutating-op in order to assemble the result,mutations are evil,
perhaps it can be suggested to use recursion?
Resulting function would be something of this sort:
The text was updated successfully, but these errors were encountered: