3 ms·
It is reinventing JSX in the sense that this JSON-based description of the user interface... const menu = [ {_type: "nav_link", to: "/a", displayName: "A
by mikojan 2y ago
It is reinventing JSX in the sense that this JSON-based description of the user interface...
const menu = [
{_type: "nav_link", to: "/a", displayName: "A"},
{_type: "nav_link", to: "/b", displayName: "B"},
{_type: "download_link", file: "/c.txt", displayName: "Download C"},
];
...is the same as this JSX-based description of the user interface...
<Menu>
<NavLink to="/a">A</NavLink>
<NavLink to="/b">B</NavLink>
<DownloadLink file="/c.txt">Download C</DownloadLink>
</Menu>
...but the first one comes with extra steps and novel markup.