In this demo we will create a TodoList and will go through custom proptypes of React. First create a folder called todo-list and add npm packages accordingly.
package.json file. I have create app and public folder. App folder will contain all our application related files and public folder will contain publicly accessible files.
App.js file. In here we will hard code our data source.
TodoListApp.js file. Content should be like below.
proptypes validations to TodoListApp.js file. In here I added a custom proptype called namePropType.
App.js, edit owner name to some longer text. In browser console you will see proptype custom validation error message.