You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Refactor: Variables are missing in props validation (let's rewrite JS to TS) 20 #8628
Problem: Variables are missing in props validation
React components should validate prop types
Why is this an issue?
In JavaScript, props are typically passed as plain objects, which can lead to errors and confusion when working with components that have specific prop requirements. However, it lacks of type safety and clarity when passing props to components in a codebase.
By defining types for component props, developers can enforce type safety and provide clear documentation for the expected props of a component. This helps catch potential errors at compile-time. It also improves code maintainability by making it easier to understand how components should be used and what props they accept.
How can I fix it?
Let re-write the entire file on TypeScript and define types for all props.
Problem locations:
packages/ketcher-react/src/script/ui/component/form/form/errorPopover.jsx
Activity
#8628 Refactor: Variables are missing in props validation (let's rewr…
#8624 Refactor: Variables are missing in props validation (let's rewr…
#8628 Refactor: Variables are missing in props validation (let's rewr…
#8624 Refactor: Variables are missing in props validation (let's rewr…