0
14
JRJose Romero
createfunctionalreactβ’β’β’
React JavaScript RecipesThe above code will return a DOM element with the specified class name.
Library: react
Shortcut: react.component.functional.props.create
import React from "react";
import PropTypes from "prop-types";
const filename = (props) => {
const {
// Deconstruct props here
} = props;
return (<div className={props.className}></div>);
};
filename.propTypes = {
className: PropTypes.string
}
export default filename;