Responsive Ad Area

Share This Post

test

Spread operator is not working in react typescript

Spread operator is not working in react typescript

I am using React + typescript and encountered with a problem regarding rendering a component.

Here is the code of what I have tried

filterCellComponent = ({ column, ...restProps }) => (
        <TableFilterRow.Cell
            column={column}
            {...restProps} />
    );

In the above method, i use the {column} variable to perform some conditions and then I render the with use of {…restProps}. But I am getting a syntax error saying some props are missing. But when I debug, all the props that are required are inside the {…restProps} variable. I do not understand why this is happening.

Here is the image that shows the error:
enter image description here

And this is the error message that i’m getting
enter image description here

Any idea on why this is happening?

Thanks


Spread operator is not working in react typescript
Spread operator is not working in react typescript
test
{$excerpt:n}

Share This Post

Leave a Reply

Your email address will not be Publishedd. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Skip to toolbar