HTML export does not support getters
- Dominant language
- TypeScript
- Stars
- 14.4k
- Forks
- 671
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Infinite loop when trying to use getter methods in `useState` and exporting to HTML
**To Reproduce**
```
import { useState } from '@builder.io/mitosis';
import { kebabCase } from 'lodash';
export default function SmileReviews(props) {
const state = useState({
get kebabCaseValue() {
return kebabCase('testThat');
},
});
return (
);
}
```
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
infinitely loops with the following error:

**Additional context**
Add any other context about the problem here.
Contributor guide
Research direction
Start at the HTML export entry point and reproduce the supplied useState example with the getter. Trace why reading state.kebabCaseValue causes the export to loop, then verify that the example finishes exporting HTML with the data-user-kebab value handled correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100