react_on_rails icon indicating copy to clipboard operation
react_on_rails copied to clipboard

Add support for replaying logs happen on async server operations

Open AbanoubGhadban opened this issue 1 year ago • 2 comments

Summary

Remove this paragraph and provide a general description of the code changes in your pull request... were there any bugs you had fixed? If so, mention them. If these bugs have open GitHub issues, be sure to tag them here as well, to keep the conversation linked together.

Pull Request checklist

Remove this line after checking all the items here. If the item is not applicable to the PR, both check it out and wrap it by ~.

  • [ ] Add/update test to cover these changes
  • [ ] Update documentation
  • [ ] Update CHANGELOG file
    Add the CHANGELOG entry at the top of the file.

Other Information

Remove this paragraph and mention any other important and relevant information such as benchmarks.


This change is Reviewable

Summary by CodeRabbit

  • Bug Fixes

    • Improved handling of console.history to ensure accurate console replay functionality across different execution contexts.
    • Enhanced management of console.history based on the rendering outcome, ensuring it resets appropriately.
  • New Features

    • Added support for custom console history in console replay functionality, allowing for greater flexibility in console state management.
    • Introduced new types and functions to streamline the server rendering process for React components, enhancing error handling and output management.
    • Updated the isPromise function to handle a broader range of input types for improved flexibility.
    • Added new properties to the RegisteredComponent interface to improve component registration and rendering capabilities.
    • Initialized console.history as an empty array during server rendering for better console log management.

AbanoubGhadban avatar Sep 24 '24 14:09 AbanoubGhadban