Spot the bug in the styled-components wrapper

from CSS-in-JS
React 19 intermediate 4 min 1 issue to find

Find the lifecycle bug in this generated styled-components wrapper.

JSX
import styled from 'styled-components';

export function SearchBox({ query, onChange }) {
  const Field = styled.input`
    border: 1px solid #94a3b8;
    padding: 0.5rem;
  `;

  return <Field value={query} onChange={onChange} />;
}
Open in playground
Report an error