Each expense shows its monthly amount, and each folder shows the sum of everything inside it. The tree is controlled: onMove produces new data, and the totals are derived from that data on every render, so dragging an expense into another folder updates both folders' totals.
Drag expenses between folders (or out to the top level) and watch the folder totals follow. The grand total stays the same, since moving an expense doesn't change how much you spend.