JSON to React
Parse JSON To React
This function accepts json and return a React componet of schema.The valid schemas are:
Note: We can either pass text or children to a component. If passed both return react component will only have text.
To use function:
JSON for React Components
We can also create already defined react componets by using JSON. The format for using them is that first we have to register them in Component Registry. JSONTOReact can create React elements for HTML elements and registered react elements.
The above code will return react element containing BluerainLogo
component.
Last updated