Open kmalap05 opened 1 year ago
No response
Currently, ESLint is giving a warning related to missing prop validation for the 'jsonCode' prop in the Editor component. This issue aims to address and resolve the warning by adding proper prop validation using PropTypes.
Before Resolving Issue:-
After Resolving Issue:-
Updated Code:-
Editor.propTypes = { jsonCode: PropTypes.string.isRequired, onJsonChange: PropTypes.func.isRequired, updatedJson: PropTypes.string, error: PropTypes.string, clearJsonCode: PropTypes.func.isRequired, setJsonCode: PropTypes.func.isRequired, }; function Editor({ jsonCode, onJsonChange, updatedJson, error, clearJsonCode, setJsonCode, }) { // Remaining code continued
Is there an existing issue for this?
Reference Issues
No response
Description
Currently, ESLint is giving a warning related to missing prop validation for the 'jsonCode' prop in the Editor component. This issue aims to address and resolve the warning by adding proper prop validation using PropTypes.
Basic Example
Before Resolving Issue:-
After Resolving Issue:-
Updated Code:-
Have you given as much information as possible about the feature?