The F-35 is not as bad as advertised; there are some key design flaws with the F-35, for instance, the aircraft layout resulted in two separated weapons bays, which increases the aircraft weight and reduces its payload capability, and the F-35 is not designed for cutting edge maneuverability; it's designed to use a combination of sensors, active, and passive defenses to defeat enemy aircraft in WVR.
The last remaining advantage the J-31 has over the F-35 is that the J-31 has a larger and unitary weapons bay. The F-35, due to its single-engine design, maintains two separate weapons bays with a maximum munitions length of about 4.3 meters. The J-31, on the other hand, maintains a single weapons bay with a bay length of around 4.7 meters, allowing the J-31 to carry not only more, but also more capable munitions than the F-35. For example, with some modification, the Kh-15 Kickback will fit in the J-31. That's a 300 km range missile with a supersonic terminal trajectory. Compare the Joint Strike Missile, which also has 300 km range, but is subsonic throughout its flight path.
==
Also please do note, the J-18 likely does not exist and is a rumor used to make fools out of overly enthusiastic fanboys. Chengdu is working on the J-20 project, while Shenyang is working on the J-31 project. There is no one left to work on the J-18 project, and China doesn't have much to gain from STOVL stealth fighters. Unlike the United States and Japan, China does not have a significant fleet of light carriers from which to operate STOVLs, whereas the United States has more than 9 light carriers and Japan has helicopter carriers that can be converted to operate F-35Bs.