Hi Hrushikesh, I think you’ve misunderstood a little bit.
Josh J

Josh, first of all, thanks for replying. Your example is little more nuanced and yes, in your case, it does help to check it.

But let me explain where I was coming from.

I understand its all optional but then, its not. eslint will cry foul if I do something like this:

type Props = {

title: string,

description: string


ContainerComp extends Component {

// react bla bla

render (props: Props) {

const {title, description, dc1Props, dc2Props} = props

return (



<DumbComponent1 {…dc1Props} />

<DumbComponent2 {…dc2Props} />



The minimum I need to do, to make eslint happy, is this:

type Props = {

title: string,

description: string,

dc1Props: Object,

dc2Props: Object


But now, using Object feels dirty, although Container doesn’t care about child props and expects child to fully deal with them.

If structured right, most smart and container components will fall into this pattern. Of course, there will be use cases where container or smart component does more and for them, as you showed, it makes sense to have type checking. But for purely passthrough ones, it becomes a forced chore.

Hopefully this makes my perspective a bit clearer.

Like what you read? Give Hrusikesh Panda a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.