Using WD-40 in that sense may not be too bad, from what my mechanic friend told me I gathered he was talking more about leaving the WD-40 in place. Some people treat WD-40 as a lubricant and it's really not.
I use a common household degreaser spray to wipe down my chain and components.