question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

it’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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
kentcdoddscommented, Aug 20, 2017

Yeah, that’d be pretty legit 👍

That’d definitely allow me to do what I want to do here! 🎉

3reactions
Rouvocommented, Jan 8, 2019

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found