Answer the question
In order to leave comments, you need to log in
How to use React components with specific parameters using TS?
Let's say there is such a React component in tsx format:
export const Comp = (a: string) => {
<div>
<h1> {a} </h1>
</div>
}
import {Component} from 'react';
import './Main.css';
class Main extends Component {
render () {
return(
<div className="Main">
</div>
);
}
}
export default Main;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question