Using bear spray, like using a fire extinguisher, should be practiced. I shot off an old expired bear spray can this summer - first time I actually used bear spray. Bear spry is dated - only lasts a number of years. At about $50 a can, I have had to buy three so far. There are some good videos on how to use bear spray. Google "Counter Assult" this is a brand name of one of the bear sprays.
I only take bear spray in grizzly country. I think bear spray is actually illegal in Yosemite and Sequoia NPs.
So far I have only taken the bear spray on a few trips. With small children around be sure the children stay away from it- A child could get seriously hurt if they played with it and it shot off.
I ran into two Canadian women this summer while in the Wind Rivers. Interestingly, they do not carry bear spray in Canada where they hike in areas with lots of grizzly bears. One woman said she accidently sprayed her backpack partner and after that, decided it was more dangerous than not having it!
Almost all Fish and Game wardens and FS rangers in Wyoming carry bear spray and highly recommend it and carry it in ADDITION to their firearms.
I do not know a single person who has actually used bear spray to fend off a bear.
Bottom line - a personal choice, not a 100% guarentee.