Closed math4mad closed 10 months ago
Do you have any more information?
If you mean the initial shortcode on the md file {{< react MyComponent >}}
There is no way to do that as it's your entry component. You could access environment variables, or fetch the required data once inside the component.
However if you're asking about prop drilling: Passing props down to sub components is the same as in any react application:
import RandomWordsComponent from "./RandomWordsComponent";
function MyNestedComponent() {
return (
<div>
<RandomWordsComponent someProp={true}/>
</div>
);
}
export default MyNestedComponent
Then you can access it as you would normally
How to add dynamical content by Props?