Yes, you can use your smartphone while charging. There is no danger in using your phone while it's charging. When you use your phone while charging, the battery is charging at a slower rate than normal to allow enough power for the ongoing usage.
Credit: Samsung