jsx-to-string
Parse your React JSX components to string.
Install
Usage
Defaults
- The default value for function is
...
. UsekeyValueOverride
for custom key values.
Options
-
useFunctionCode (boolean)
Optional. Defaults to false. Whether or not to use the function actual source code instead of
...
For example:
-
functionNameOnly (boolean)
Optional. Defaults to false. Whether prop function values should contain only the name.
This flag will only be used ifuseFunctionCode
is set to true.For example:
-
keyValueOverride (object)
A key-value map that overrides the value of any React props with exact match with the given key. For example:
-
ignoreProps (array)
An array of string keys that should be ignored from the JSX string. For example:
-
ignoreTags (array)
An array of string tags that should be ignored from the JSX string. For example:
- shortBooleanSyntax (boolean)
Optional. Defaults to false. Whether or not to show the short or long boolean syntax.
-
displayName (string)
A custom value to be used as the component name. For example: