JSONX Manual
- Home
- Getting Started
- External and Custom Components
- Using Advanced Props
- Creating React Components and Component Libraries
- JSONX & JXM Spec
- Samples
- Roadmap
- Full API Docs
Examples
Some other sample page
this is raw html
replace
Example Browser Usage
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSONX TEST</title>
<script type="text/javascript" src="jsonx.umd.js"></script>
</head>
<body>
<div id="root"></div>
<script type="text/javascript">
const sampleJSONX = {
component: 'div',
props: {
id: 'generatedJSONX',
className:'jsonx',
},
children: [
{
component: 'p',
props: {
style: {
color: 'red',
fontWeight:'bold',
},
},
__dangerouslyEvalProps:{
onClick:'()=>alert("click works")'
},
children:'hello world',
},
],
};
const boundConfig = {
debug:true,
};
jsonx.jsonxRender.call(boundConfig,{ jsonx: sampleJSONX, querySelector:'#root', });
</script>
</body>
</html>
