why not do both?
review some ‘good code’ and also give out a small task.
from my experience the real problem is that most companies don’t put enough thought into the task they create, who its created for and what they expect to see from it.
resulting in a too big of a task for candidates that usually hardly have time for them (in your case: senior frontend engineers are usually already employed somewhere while looking for a job :) ).
I am strongly for giving out a small well thought of task.
It really shows the work-process of the candidate and it gives you also something to discuss (why this tool, tell me about this and that, what would you improve/change if you had more time/had to support X)