Skip to content

Commit d03434d

Browse files
Add RBS type signatures and CHANGELOG entry for async component helpers
- Add RBS signatures for AsyncValue, ImmediateAsyncValue, and AsyncRendering - Add CHANGELOG entry for the async_react_component feature 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 8aaf212 commit d03434d

File tree

4 files changed

+49
-0
lines changed

4 files changed

+49
-0
lines changed

react_on_rails_pro/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ _Add changes in master not yet tagged._
2525

2626
### Added
2727

28+
- **Async React Component Rendering**: Added `async_react_component` and `cached_async_react_component` helpers for concurrent component rendering. Multiple components now execute HTTP requests to the Node renderer in parallel instead of sequentially, significantly reducing latency when rendering multiple components in a view. Requires `ReactOnRailsPro::AsyncRendering` concern in controller. [PR 2139](https://github.com/shakacode/react_on_rails/pull/2139) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
2829
- Added `config.concurrent_component_streaming_buffer_size` configuration option to control the memory buffer size for concurrent component streaming (defaults to 64). This allows fine-tuning of memory usage vs. performance for streaming applications.
2930
- Added `cached_stream_react_component` helper method, similar to `cached_react_component` but for streamed components.
3031
- **License Validation System**: Implemented comprehensive JWT-based license validation with offline verification using RSA-256 signatures. License validation occurs at startup in both Ruby and Node.js environments. Supports required fields (`sub`, `iat`, `exp`) and optional fields (`plan`, `organization`, `iss`). FREE evaluation licenses are available for 3 months at [shakacode.com/react-on-rails-pro](https://shakacode.com/react-on-rails-pro). [PR #1857](https://github.com/shakacode/react_on_rails/pull/1857) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module ReactOnRailsPro
2+
class AsyncValue
3+
attr_reader component_name: String
4+
5+
@task: untyped
6+
@component_name: String
7+
8+
def initialize: (component_name: String, task: untyped) -> void
9+
10+
def value: () -> untyped
11+
12+
def resolved?: () -> bool
13+
14+
def to_s: () -> String
15+
16+
def html_safe: () -> untyped
17+
end
18+
end
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module ReactOnRailsPro
2+
module AsyncRendering
3+
module ClassMethods
4+
def enable_async_react_rendering: (**untyped options) -> void
5+
end
6+
7+
@react_on_rails_async_barrier: untyped
8+
9+
private
10+
11+
def wrap_in_async_react_context: () { () -> untyped } -> untyped
12+
13+
def check_for_unresolved_async_components: () -> void
14+
end
15+
end
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module ReactOnRailsPro
2+
class ImmediateAsyncValue
3+
attr_reader value: untyped
4+
5+
@value: untyped
6+
7+
def initialize: (untyped value) -> void
8+
9+
def resolved?: () -> bool
10+
11+
def to_s: () -> String
12+
13+
def html_safe: () -> untyped
14+
end
15+
end

0 commit comments

Comments
 (0)