{"record":{"id":"a7525ad5a7fac1ff","repo":"reflex-dev/reflex","slug":"f-the-prop-prop-r-is-deprecated-but-the-replace","errorCode":null,"errorMessage":"f\"The prop {prop!r} is deprecated, but the replacement {new_prop!r} is also passed. Please remove {prop!r}.\"","messagePattern":"f\"The prop (.+?) is deprecated, but the replacement (.+?) is also passed\\. Please remove (.+?)\\.\"","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"packages/reflex-components-react-player/src/reflex_components_react_player/react_player.py","lineNumber":256,"sourceCode":"        \"\"\"Create a component.\n\n        Args:\n            *children: The children of the component.\n            **props: The props of the component.\n\n        Returns:\n            The created component.\n\n        Raises:\n            ValueError: If both a deprecated prop and its replacement are both passed.\n        \"\"\"\n        for prop, new_prop in _DEPRECATED_PROP_MAP.items():\n            if prop in props:\n                if new_prop in props:\n                    msg = (\n                        f\"The prop {prop!r} is deprecated, but the replacement {new_prop!r} is also passed. Please remove {prop!r}.\",\n                    )\n                    raise ValueError(msg)\n                logger.warning(\n                    f\"The prop {prop!r} has been replaced by {new_prop!r}, please update your code.\",\n                )\n                props[new_prop] = props.pop(prop)\n        return super().create(*children, **props)  # type: ignore[return-value]\n\n    def _render(self, props: dict[str, Any] | None = None):\n        \"\"\"Render the component. Adds width and height set to None because\n        react-player will set them to some random value that overrides the\n        css width and height.\n\n        Args:\n            props: The props to pass to the component.\n\n        Returns:\n            The rendered component.\n        \"\"\"\n        return (","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/reflex-dev/reflex/blob/45b8ed5ab735f8a56bbb09a42384f030eb0208e7/packages/reflex-components-react-player/src/reflex_components_react_player/react_player.py#L238-L274","documentation":"react-player deprecated certain props in favor of replacements (tracked in _DEPRECATED_PROP_MAP). Passing both the old prop and its replacement is ambiguous, so Reflex raises ValueError telling you to remove the deprecated one; passing only the old one logs a warning and auto-migrates it.","triggerScenarios":"e.g. rx.react_player(url=..., src=...) when src replaced url, or any old/new pair from _DEPRECATED_PROP_MAP passed together (commonly url→src style renames across versions).","commonSituations":"Upgrading reflex-components-react-player and merging old example code with new docs; copy-pasting snippets that mix API generations.","solutions":["Remove the deprecated prop and keep only the new one","Check _DEPRECATED_PROP_MAP in react_player.py to see the exact old→new mapping","Update all call sites and silence the migration warning by using new names exclusively"],"exampleFix":"# before\nrx.react_player(url=media_url, src=media_url)\n# after\nrx.react_player(src=media_url)","handlingStrategy":"validation","validationCode":"for old in _DEPRECATED_PROP_MAP:\n    if old in props:\n        props.pop(old)  # keep only the new prop","typeGuard":null,"tryCatchPattern":null,"preventionTips":["After upgrading react-player, grep call sites for old prop names","Never pass both an old prop and its documented replacement"],"tags":["reflex","react-player","deprecated-prop","migration"],"backgroundTag":"deprecated-prop-conflict","analyzedSha":"45b8ed5ab735f8a56bbb09a42384f030eb0208e7","analyzedAt":"2026-08-28T19:25:27.644Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}