Each state decides how to allocate their electoral votes. Most states are winner take all. Maine, for instance, is not, but instead allocates some of theirs by congressional district winners.