algolia / algolia/react-element-to-jsx-string
Format prop elements
Open
bug
unconfirmed
- Dominant language
- JavaScript
- Stars
- 518
- Forks
- 87
- Avg merge
- 3h 56m
- Merged PRs (30d)
- 3
Description
`r-e-t-j-s` (version `14.3.2`) formats child elements pretty well, like so:
```javascript
```
... However, elements passed as props get the `inline` -treatment:
```javascript
Input:}
onClear={handleFunction}
/>
```
**maxInlineAttributesLineLength** seems to have no effect here. Is there a way to get "prop elements" to get pretty-printed in the same way as regular `children` are? Or am I simply doing something wrong?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the JSX formatting example with react-element-to-jsx-string 14.3.2 and maxInlineAttributesLineLength enabled. Trace how the formatter handles elements supplied through props versus regular children, then verify that prop elements receive the requested multiline formatting without changing the existing child-element output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100