Active dendritic branchlets enable the propagation of dendritic spikes, whose computational functions remain an open question. Here we propose a concrete function to the active channels in large dendritic trees. Modelling the input-output response of large active dendritic arbors subjected to complex spatiooral inputs and exhibiting non-stereotyped dendritic spikes, we find that the dendritic arbor can undergo a continuous phase transition from a quiescent to an active state, thereby exhibiting spontaneous and self-sustained localized activity as suggested by experiments. Analogously to the critical brain hypothesis, which states that neuronal networks self-organize near criticality to take advantage of its specific properties, here we propose that neurons with large dendritic arbors optimize their capacity to distinguish incoming stimuli at the critical state. We suggest that "computation at the edge of a phase transition" is more compatible with the view that dendritic arbors perform an analog rather than a digital dendritic computation.