New react developer, i am getting an array of objects(identifier:'' and name:'') in console, i want to know is there a way to know what kind of type am i getting (for example are 'name's boolean, string, number...?)
console.log("data",stateToProps?.map((data) => data.name) );
Sometimes at work i get to refactor others code and to add typescript, this would help me alot. any suggestions ?
const stateToProps = useSelector((state) => {
const articles = {
sites: state.articles.sites,
brokers: state.siteArticles.brokers,
};
return articles[props.action];
});
console.log("data", stateToProps);