Description
Design and implement a useRef hook that allows content authors to access AST nodes directly. This will provide a way for authors to get references to AST nodes for advanced use cases.
Tasks
- Research optimal approach for exposing AST nodes via refs
- Implement
useRef hook that creates mutable ref objects
- Create mechanism to attach refs to AST nodes during compilation
- Determine how refs will be accessed in the generated AST
- Add tests for ref creation and assignment
- Document limitations and use cases for refs in DSL context
Acceptance Criteria:
useRef creates mutable ref objects
- Refs can be attached to elements via the ref prop
- Refs correctly receive AST node references
- Implementation has test coverage
- Documentation explains how and when to use refs in the DSL
Description
Design and implement a
useRefhook that allows content authors to access AST nodes directly. This will provide a way for authors to get references to AST nodes for advanced use cases.Tasks
useRefhook that creates mutable ref objectsAcceptance Criteria:
useRefcreates mutable ref objects