Arduino Uno serial communication with ESP32 using voltage divider

Here is how I connected my Uno to an ESP8266 using a voltage divider on the serial port. It would be the same for ESP32. The resistors could be 1K (R1) and 2K (R2) or 10K and 20K or any values as long as the ratio is 1:2. This is using software serial where Uno pin 8 is RX (to ESP TX) and Uno pin 9 is TX to ESP RX.