« first day (4432 days earlier)      last day (732 days later) » 

07:41
@MarySmithJames Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
0
Q: For the purpose of creating 1 unique container that is different from the others

Mary Smith JamesUpdated jsfiddle links: Also provided more information. Can you help me? Currently, clicking on the button takes you to .play2, where it opens, just no video is appearing. Broken Code, I am trying to get working. Has the 1 added container in it. https://jsfiddle.net/aouymthe/ <button class="pla...

Can anyone help me with that?
 
4 hours later…
11:52
If we use React.cloneElement
Is it possible to pass prop to deeply nested child element, or just first ?
What if I have child of child
for example
const NestedChild = ({ age }) => {
  return <p>Nested child {age}</p>;
};

const Child = (props) => {
  return <p>Child {props.children}</p>;
};

const Parent = ({ children }) => {
  const newChildren = React.Children.map(children, (child) =>
    React.cloneElement(child, { age: 1 })
  );

  return <div>{newChildren}</div>;
};

export default function App() {
  return (
    <div className="App">
      <Parent>
        <Child>
          <NestedChild />
        </Child>
      </Parent>
    </div>
why this does not work ?
I mean, I don't have access of {age} from Parent in NestedChild

« first day (4432 days earlier)      last day (732 days later) »