Can PEX be connected directly to a water heater or should use a flex connector or a short length of copper be used first. I have seen it done both ways but wonder if there is a code issue or manufacturers recommendation.
The plastic pipe and fittings association PEX installation guidelines recommend an 18" minimum length of copper or other approved pipe above the water heater. Individual PEX manufacturers may have more or less restrictive proprietary requirements. I have never seen a PEX line directly connected at the top of a water heater...There's always a section of pipe. Additionally, the 12" clearance requirement for PEX from sources of heat would put a PEX-only installation in conflict with the water heater vent.