What to build
Implement the static analysis module that determines whether a component (and its import tree) is interactive. This is the Marko-style auto-inference engine.
The analyzer receives a component's source code and its resolved import graph, then checks for signals of interactivity:
- React hooks:
useState, useEffect, useRef, useReducer, useCallback, useMemo, useSyncExternalStore, useTransition
- Event handler props in JSX:
onClick, onChange, onSubmit, onKeyDown, etc.
- Browser APIs:
window, document, addEventListener, navigator
- Custom hooks (functions starting with
use that call other hooks)
If a component OR any component in its import tree uses any of these, it's marked interactive.
Returns a boolean per component/slot.
Acceptance criteria
Blocked by
What to build
Implement the static analysis module that determines whether a component (and its import tree) is interactive. This is the Marko-style auto-inference engine.
The analyzer receives a component's source code and its resolved import graph, then checks for signals of interactivity:
useState,useEffect,useRef,useReducer,useCallback,useMemo,useSyncExternalStore,useTransitiononClick,onChange,onSubmit,onKeyDown, etc.window,document,addEventListener,navigatorusethat call other hooks)If a component OR any component in its import tree uses any of these, it's marked interactive.
Returns a boolean per component/slot.
Acceptance criteria
Blocked by