Skip to content
Advertisement

How to pass props to a component which is being passed as value

here is my code scenario

JavaScript

I am using components in another component like below.

JavaScript

I want to pass a prop to EditableCell which is a component defined in another file. when I do following it gives me error

JavaScript

I am not sure how do I pass props. Please help.

Advertisement

Answer

You need to wrap the component in a function:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement