Class: JsxRosetta::IR::ReactHookCall
- Inherits:
-
Data
- Object
- Data
- JsxRosetta::IR::ReactHookCall
- Includes:
- Node
- Defined in:
- lib/jsx_rosetta/ir/types.rb
Overview
A React hook invocation detected in the component body (‘useState`, `useEffect`, …). Surfaced separately from local_bindings so backends can emit a more specific TODO that points at the Stimulus / Hotwire / server-render alternative, instead of a generic “translate this JS”.
hook : String — hook function name (‘“useState”`, `“useEffect”`, …) source : String — verbatim JS of the entire statement.
Instance Attribute Summary collapse
-
#hook ⇒ Object
readonly
Returns the value of attribute hook.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Attribute Details
#hook ⇒ Object (readonly)
Returns the value of attribute hook
55 56 57 |
# File 'lib/jsx_rosetta/ir/types.rb', line 55 def hook @hook end |
#source ⇒ Object (readonly)
Returns the value of attribute source
55 56 57 |
# File 'lib/jsx_rosetta/ir/types.rb', line 55 def source @source end |