Discussion about this post

User's avatar
Stanisław's avatar

What's the difference between use prop-types and interface or type?

```

import React from 'react';

interface ButtonProps {

label: string;

}

const Button = ({ label }: ButtonProps) => (

<button>{label}</button>

);

export default Button;

```

I think it will give the same effect but without using an additional pack

No posts

Ready for more?