Skip to content

Commit

Permalink
add test on optional chaining in dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Fong Kye committed Aug 24, 2020
1 parent e68b26b commit e740223
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,18 @@ const tests = {
}
`,
},
{
code: normalizeIndent`
function MyComponent() {
const x = true ? { test: true } : undefined;
useEffect(() => {
if (x?.test) {
console.log("testing");
}
}, [x?.test]);
}
`,
},
{
code: normalizeIndent`
function MyComponent(props) {
Expand Down

0 comments on commit e740223

Please sign in to comment.