Arduino IR practice vs. application circuit on 1838 datasheets
The capacitor is definitely helpful for these sensors. Its absence manifests in rather devious ways, as I learned when working from a tutorial that didn’t have a capacitor: When testing the IR decoding in isolation, it might very well work. Once you add other elements to the circuit (in my case, an RGB LED), the IR decoder suddenly starts generating nonsense readings.