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
But the API is pretty neat, looks better than seapig. We could do something similar really easily tho:
instead of
importseapig,{OPTIONAL,REQUIRED}from'seapig'constMain=props=>{const{
sidebarChildren,// array of children with the `sidebar` prop
contentChildren // array of children with the `content` prop}=seapig(props.children,{// schema objectsidebar: OPTIONAL,// sidebar is optionalcontent: REQUIRED// content is required})// rendering order is always the samereturn(<div>{sidebarChildren.length&&<aside>{sidebarChildren}</aside>}<section>{content}</section></div>)}
there is a new lib (https://github.com/jxnblk/macro-components) that does pretty much what we are doing it but that have a lot more constraints and is more fragile (jxnblk/macro-components#3).
But the API is pretty neat, looks better than
seapig
. We could do something similar really easily tho:instead of
we could have
we lose the schema but maybe it can be an optional second argument to the
seapig
functionThe text was updated successfully, but these errors were encountered: