score:0

// SECOND-CHILD

import React from 'react';
import { ParentContext } from './Parent';
import { ChildContext } from './Child';

// define component
const AnotherChild = props => { 
  const { parentClass } = React.useContext(ParentContext);
  const { childClass } = React.useContext(ChildContext);

  return (
    <div className={ParentClass}>
      <div className={childClass}></div>
    </div>
  )
};

Related Query

More Query from same tag