Skip to content
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

Allow custom serialisation of prop values #278

Open
almilo opened this issue Jan 15, 2018 · 2 comments
Open

Allow custom serialisation of prop values #278

almilo opened this issue Jan 15, 2018 · 2 comments

Comments

@almilo
Copy link

almilo commented Jan 15, 2018

Prop values of type Set are serialised as foo={[object Set]}. It would be much more convenient to serialised them in a similar way to the Arrays (i.e. foo={Set ['one', 'two', 'three']}).
This could be coded as an extension if custom serialisation of props were supported or as a specific prop serialiser for Set values.

Thanks,
Alberto

@vvo
Copy link
Contributor

vvo commented Jan 19, 2018

I guess we could at least have a first try at adding a new formatter for Sets, wanna have a try? https://github.com/algolia/react-element-to-jsx-string/tree/master/src/formatter

@armandabric
Copy link
Collaborator

We are always looking to improve the formatting. Any suggestions are welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants