hydrogen/packages/eslint-plugin/src/rules/no-effects-in-server-components/examples/invalid.example.tsx
2021-11-11 10:51:16 +01:00

13 lines
270 B
TypeScript

// Examples of **incorrect** code for this rule:
// MyComponent.jsx or MyComponent.server.jsx
import {useEffect} from 'react';
function MyNonClientComponent() {
useEffect(() => {
// code inside this useEffect will not execute as expected
});
return null;
}