There would be hormones floating around in the water and both fish would respond to each others' presence, even if they can't see each other.
What I found works great for a stress-free divider is sandwiching a bunch of java moss between two dividers made of black plastic mesh. You can even put the heater and filter between the two dividers.
(the brown water from IAL makes things hard to see but there's a bunch of java moss between the two dividers)
I didn't like using a single divider because the fish can see each others' reflections on the tank wall when they're both close to the divider, whether plants are around the divider or not.