Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
WalkthroughIntroduces an optional Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan for PR comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| const MarkdownInput: FC<MarkdownInputProps> = ({ value, onChange }) => { | ||
| return <MarkdownEditor value={value} onChange={onChange} />; | ||
| return <MarkdownEditor value={value ?? ''} onChange={onChange} />; | ||
| }; |
There was a problem hiding this comment.
const MarkdownInput: FC<MarkdownInputProps> = ({ value = '', onChange }) => {
return <MarkdownEditor value={value} onChange={onChange} />;
};
This removes the need for value ?? '' in JSX and keeps the fallback logic closer to the prop definition, improving readability.
In what cases will the value become undefined? I plan this component to receive a string always to avoid this kind of situations



Why is this pull-request needed?
Provided default value to Markdown component
Main changes
Provided default value to Markdown component
Summary by CodeRabbit
Bug Fixes
Tests