How to correctly define a reference (React.RefObject<StyledComponentClass>) for styled-components (for TypeScript)?
问题 How to correctly define a reference for styled-components? I wrote the following test code. This is a refined code, unlike the previous one (How to correctly define a reference (React.RefObject) for styled-components (for TypeScript)?). Added reference type StyledComponentClass< {}, any> . import React, {Component, RefObject, ReactNode} from 'react'; import styled, {StyledComponentClass} from 'styled-components'; type TModalShadowContainer = StyledComponentClass<{}, any>; const