How the React Interface Schema (RIS) works
mastersyntux does not generate HTML or JSX source code. Instead, it generates a React Interface Schema (RIS), which is a JSON-DSL representation of the UI.
Key characteristics of RIS:
- Flat JSON List: Unlike older versions that used deep trees, the current RIS is a flat list of JSON objects, where each object contains an
idand aparentId. This allows the UI to be built progressively (streamed). - Value Binding: The schema does not hardcode values. Instead, it uses a
$bindmechanism to link UI elements to properties of the providedvalue. - Built-in Iterators: It uses special types like
__ForEach__to handle arrays efficiently without duplicating data.
Example RIS structure:
{"id":"loop_1", "parentId":"root", "type":"__ForEach__", "props":{"source":"authors"}}
{"id":"card_1", "parentId":"loop_1", "type":"div", "props":{"className":"card"}, "content": {"$bind": "$item.name"}}