-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function as children display #63
Comments
I think right now this module is sort of a shallow renderer (only root level). This issue is similar to algolia/expect-jsx#24. Ultimately we COULD be deep but it would have to be implemented. Let me know if this makes sense. |
That totally makes sense. We are currently building our internal styleguide code samples with I'll try to evaluate how much work it is to implement this. |
Closing this since for being idle. If you want to work on that @pascalduez, feel free to reopen an issue with more details |
@pascalduez did you have any success with this?
thanks in advance |
@bnjmn-jns This looks like a different issue your describing, more to do with HOC's and More thorough: |
@pascalduez works like a charm thank you! |
What about support for function children in the element being rendered. E.g. reactElementToJSXString(<Foo>{() => <Whatever />}</Foo>, {showFunctions: true, functionValue: fn => "~replaced function~")
// Expected:
<Foo>~replaced-function~</Foo>
// Actual:
<Foo /> Looking at the source, I believe this is an unintentional side-effect of |
Hi,
is
react-element-to-jsx-string
able to output/format a "Function as children"? (More infos)Output from
react-element-to-jsx-string
:Expected output:
The text was updated successfully, but these errors were encountered: