This PR marks some fields on the LottieProps type signature as Optional in order to match the React PropTypes.
In a TypeScript project, creating a LottiePlayer with only animationData will trigger this TypeScript error:
Type '{ animationData: Record<string, unknown>; play: boolean; loop: true; }' is missing the following properties from type 'Pick<any, "loop" | "renderer" | "rendererSettings" | "audioFactory">': renderer, rendererSettings, audioFactory
According to the React PropTypes, the "missing" fields are not required and the component functions without them.
This PR marks some fields on the
LottieProps
type signature as Optional in order to match the React PropTypes.In a TypeScript project, creating a LottiePlayer with only
animationData
will trigger this TypeScript error:According to the React PropTypes, the "missing" fields are not required and the component functions without them.