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
@billypon
You can receive them from a parent function or describe them in pure jsx syntax.
div
// from parent
MyComponent(renderFunction='{renderFunction}') // inline function with jsx
MyComponent(renderFunction='{data => <div>{data}</div>}')
importReactfrom'react';exportdefaultfunction(params={}){const{ renderFunction, MyComponent }=params;return(<div>{/* from parent */}<MyComponentrenderFunction={renderFunction}/>{/* inline function with jsx */}<MyComponentrenderFunction={data=><div>{data}</div>}/></div>);}
How to pass a function and return ReactNode?
Like this example, how to transform it to pug file?
The text was updated successfully, but these errors were encountered: