accept props
See original GitHub issueit’s good to be able to pass props in widget configs
example: if we have a video player widget - would be great if the client\host DOM can pass props within the JSON config like what we already have in { "clone": "id-xyz" }
but:
<script type="widget/config">
{
"props":{
"videoId: "11223300",
"playFromStart": true
}
}
</script>
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Components and Props - React
Conceptually, components are like JavaScript functions. They accept arbitrary inputs (called “props”) and return React elements describing what should appear on ...
Read more >React Props - W3Schools
Props are arguments passed into React components. Props are passed to components via HTML attributes. props stands for properties. React Props. React Props...
Read more >How to use Props in React - Robin Wieruch
Everything you need to know about props in React. How to pass props to components, how to ... A HTML button can receive...
Read more >How to Use Props in React - freeCodeCamp
We use props in React to pass data from one component to another (from a parent component to a child component(s)). Props is...
Read more >A Simple Guide to Component Props in React
Let's make the <Message> component accept 2 props to customize the greet message, as well as the greet person:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, that’d be pretty legit 👍
That’d definitely allow me to do what I want to do here! 🎉
Hello,
I also would like to pass functions to a widget. From reading this thread I assume you already did implement the exposing of DOM events? However, I cannot find anything like
registerDomEvent
Can anyone provide an example of passing functions/using events across parent and child/widget components?