Listing 4-8: Creating a Component with React.createClass
User Profile
import React from 'react';
import createClass from 'create-react-class';
const UserProfile = createClass({
render() {
return (
<h1>User Profile</h1>
);
}
});
export default UserProfile;
Download the examples, report issues, and ask/answer questions in the discussion area by visiting the book's github page. All of the code for the book is also available on codesandbox.io for you to play around with.
ReactJS Foundations is published by John Wiley and Sons, Inc and is available in paperback and eBook.