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

✨ Add ability to customize act per call #3889

Merged
merged 7 commits into from
May 18, 2023
Merged

✨ Add ability to customize act per call #3889

merged 7 commits into from
May 18, 2023

Conversation

dubzzz
Copy link
Owner

@dubzzz dubzzz commented May 18, 2023

The act is the only way to make sure we can wrap some extra logic around the piece of code firing continuations of the awaited task.

It proves pretty useful in React contexts (and not only) as such contexts need to explicitely run some operations in very specific contexts. In the case of React tests, updates of states have to be performed in act context. This argument makes it possible for the users to specify per scheduled task how they should be wrapped. Up-to-now the act was only configurable globally without any by-site customization.

Category:

  • ✨ Introduce new features
  • 📝 Add or update documentation
  • ✅ Add or update tests
  • 🐛 Fix a bug
  • 🏷️ Add or update types
  • ⚡️ Improve performance
  • Other(s): ...

Potential impacts:

  • Generated values
  • Shrink values
  • Performance
  • Typings
  • Other(s): ...

The `act` is the only way to make sure we can wrap some extra logic around the piece of code firing continuations of the awaited task.

It proves pretty useful in React contexts (and not only) as such contexts need to explicitely run some operations in very specific contexts. In the case of React tests, updates of states have to be performed in `act` context. This argument makes it possible for the users to specify per scheduled task how they should be wrapped. Up-to-now the `act` was only configurable globally without any by-site customization.
@codesandbox-ci
Copy link

codesandbox-ci bot commented May 18, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 190339f:

Sandbox Source
Vanilla Configuration

@dubzzz dubzzz merged commit b2d44e8 into main May 18, 2023
66 checks passed
@dubzzz dubzzz deleted the act-by-schedule branch May 18, 2023 17:50
dubzzz added a commit that referenced this pull request May 18, 2023
dubzzz added a commit that referenced this pull request May 18, 2023
* ✨ Add ability to customize `act` per wait

Follow-up of #3889

* versions
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.

None yet

1 participant