class WPSitesSelector extends React.Component {
// Render method.
render() {
// Array with links.
const data = [
{
url: 0,
title: 'Select a Site'
},
{
url: 'https://tommcfarlin.com/wp-json/wp/v2/posts',
title: 'TomMcFarlin.com'
}
];
// Building a list of options as React Elements with JSX.
const links = data.map( ( link, index ) => {
return (
)
});
// Returning the select dropdown with all the links as options.
return (
)
}
}