Skip to content

Commit

Permalink
chore: give components a render name
Browse files Browse the repository at this point in the history
Ensures easier debugging with React devtools.
  • Loading branch information
nikku committed Oct 18, 2024
1 parent 5a810f3 commit 25b3afa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/src/app/TabsProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default class TabsProvider {
return false;
},
getComponent() {
return forwardRef((props, ref) => {
return forwardRef(function EmptyTabProducer(props, ref) {
return <EmptyTab ref={ ref } { ...props } tabsProvider={ self } />;
});
},
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/slot-fill/Slot.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default class Slot extends PureComponent {

}

const fillFragment = (Component) => (fill) => {
const fillFragment = (Component) => function FragmentFill(fill) {
const { id, props } = fill;

if (!Component) {
Expand Down
6 changes: 3 additions & 3 deletions client/src/shared/ui/Section.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,21 @@ export function Section(props) {
}


Section.Header = function(props) {
Section.Header = function Header(props) {
return (
<h3 className="section__header">
{ props.children }
</h3>
);
};

Section.Actions = function(props) {
Section.Actions = function Actions(props) {
return (
<span className="section__actions">{ props.children }</span>
);
};

Section.Body = function(props) {
Section.Body = function Body(props) {
return (
<div className="section__body">
{ props.children }
Expand Down

0 comments on commit 25b3afa

Please sign in to comment.