Skip to content

Promise Caching and Error Handling #344

@davesnx

Description

@davesnx

Description

Implement promise caching functionality and improve promise error handling.

Context

There's commented-out code showing promise caching implementation for Js.Promise.t types. The implementation would cache promises to avoid re-executing them. Additionally, there are references to issue #251 regarding promise failure handling.

Files

  • packages/server-reason-react-ppx/server_reason_react_ppx.ml:545
  • packages/reactDom/src/ReactServerDOM.ml:381
  • packages/reactDom/test/test_RSC_model.ml:967

Acceptance Criteria

  • Determine when promise caching is needed
  • Implement promise caching mechanism
  • Review and fix issue Client value as props can fail and will reach the toplevel handler #251 (promise failure handling)
  • Add configuration options for caching behavior
  • Add tests for promise caching and error scenarios
  • Implement the missing test for client components with promise failed props

Related to #314

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions