Comparing hydrogen to batteries, the point where one becomes competitive over the other depends a lot on requirements of the application. It's obvious that batteries are the only practical solution for applications like mobile phones and laptops. For cases where more energy storage is needed, hydrogen might be a better option, or it might not, depending on specifics. Both technologies will be around for a long time to come, but I personally wouldn't put my money on gaseous hydrogen for home energy storage.
What's the required energy density? For less than tens of kWh, batteries are a clear winner here. Once getting to MWh scales, then hydrogen can be superior.
Peak vs. average power capability? Batteries can provide a much higher ratio.
Capital cost vs. cost per lifetime unit energy storage. Hydrogen takes more initial investment, but cost per energy stored can be lower. Both batteries and hydrogen infrastructure have finite life, so this one needs to be analyzed in depth on a per-application basis.
Safety requirements? Both H and batteries have potential safety problems, but they are very different and which one is better depends a lot on the application. For domestic use I'd greatly prefer batteries.
Cost of energy vs. cost of storage? Batteries have much better round-trip efficiency, but hydrogen can be cheaper per kWh.
Both fields are also in rapid development, especially alternative battery technologies prioritizing cycle life, cost and reliance on conflict minerals, over power and energy density.