The trick I see the most is actually hiring consultants. They're basically like employees but it's not you who hire them, it's the consultancy company. So you can have them working for your startup in short contracts of a few months (which can be prolongued and without much trouble even terminated early). But normally, they also have clauses against trying to hire the consultants directly, so if they are really good and write a good chunk of your stuff, when they leave you might be left in a bit of trouble.