Closed SoloJiang closed 2 years ago
Replay code:
import { createElement, render, useState, Fragment } from 'rax'; import Driver from 'driver-universal'; let index = 0; function Home() { const [arr, setArr] = useState([1, 2, 3, 4, 5, 6]); function click() { switch (index) { case 0: setArr([4, 5, 6]); break; case 1: setArr([1]); break; default: break; } index++; } return ( <div onClick={click}> {new Array(6).fill(1).map((v, index) => ( <Fragment key={index}>{arr[index]}</Fragment> ))} </div> ); } render(<Home />, document.getElementById('root'), { driver: Driver });
More simple case, u can see the added test cases.
All committers have signed the CLA.
Replay code:
More simple case, u can see the added test cases.