I used to pin baste but once I started glue basting with washable school glue (Elmer's or other brands) that's all I use for machine quilting. I have never used spray basting for quilts because I didn't want the expense, fumes or mess of the over spray. Some of my friends spray baste and wouldn't do it any other way.
There is a lot of information about glue basting if you want to explore that. Either google it or put it in the search bar on Quilting Board and you'll find a lot. It does not work well for hand quilting and you have to wash it out so for a wall hanging you might not wash then it wouldn't work their either. For those I thread baste.