You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using MDXRemote and got error when doing parseProps
Detail error:
⨯ Error: at root
Error for `steps`: Required
{
"expected": "array",
"received": "undefined"
}
at CodeStep (src/components/code-step.tsx:11:38)
9 |
10 | export function CodeStep(props: any) {
> 11 | const { steps }: any = parseProps(props, Schema);
| ^
12 |
13 | if (!steps) return <>Error</>;
14 | {
digest: '1441303843'
}
Sample MDX:
<CodeStep>
## !!step A Game of Thrones
The first book in the A Song of Ice and Fire series by George R.R. Martin.
``js ! george.js
const houses = ['Stark', 'Lannister', 'Baratheon', 'Targaryen'];
const winner = houses[Math.floor(Math.random() * houses.length)];
console.log(`Iron Throne: ${winner}`);
``
## !!steps A Clash of Kings
The second book in the series.
`` js ! george.js
const houses = ['Stark''Targaryen'];
const clash = () => {
const winner = houses[Math.floor(Math.random() * houses.length)];
return `${winner} wins the battle!`;
};
console.log(clash());
``
</CodeStep>
I'm using MDXRemote and got error when doing
parseProps
Detail error:
Sample MDX:
The "``" is the open/close ```
Implmentation code:
The text was updated successfully, but these errors were encountered: