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

Recognise mapArray as a tracked scope #56

Merged
merged 1 commit into from
Jan 3, 2023
Merged

Recognise mapArray as a tracked scope #56

merged 1 commit into from
Jan 3, 2023

Conversation

jfrere
Copy link
Contributor

@jfrere jfrere commented Jan 2, 2023

Previously, mapArray was not seen as a tracked scope. Now, the first argument to mapArray is seen as a tracked scope, but the second argument is not.

See #52 and #55 for details.

Fixes #55

Previously, `createMemo` was not seen as a tracked scope.  Now, the
first argument to `createMemo` is seen as a tracked scope, but the
second argument is not.

See #52 and #55 for details.
@jfrere jfrere changed the title Recognise createMemo as a tracked scope Recognise mapArray as a tracked scope Jan 3, 2023
@jfrere
Copy link
Contributor Author

jfrere commented Jan 3, 2023

I've just realised that I wrote "createMemo" instead of "mapArray" in the PR title... The code was correct, but clearly I was too tired when I was writing this up! 😅

@joshwilsonvu
Copy link
Collaborator

Haha, no worries, thank you so much for sending a PR! I'm especially grateful for the new tests. There's a little bit more I'd like to add since we're on the subject, namely:

  • marking the second mapArray argument as a "sync callback", like the way Array#map callbacks don't open up a new "scope"
  • handling indexArray as well

But I won't make you deal with that, just making a note to myself. This looks good to merge as-is!

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.

First argument to mapArray should be recognised as a tracked scope
2 participants