Skip to content

Commit

Permalink
Fix parameter name in default props test. fixes #1610
Browse files Browse the repository at this point in the history
  • Loading branch information
Sampo Kivistö committed Oct 13, 2022
1 parent 12be729 commit aace380
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/inferno/__tests__/defaultprops-typings.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ describe('default prop typings', () => {
};

class MyComponent extends Component<MyComponentProps, any> {
constructor(props, state) {
super(props, state);
constructor(props, ctx) {
super(props, ctx);
}

public static defaultProps = {
Expand Down

3 comments on commit aace380

@jhsware
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Havunen isn't it better to just call it context just to avoid someone thinking it is a special ctx object?

const instance = new type(props, context);

@Havunen
Copy link
Member

@Havunen Havunen commented on aace380 Oct 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heh, true. It has become a habit for me to call it ctx because in our app we have separate global "context" object :D

@Havunen
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed :)

Please sign in to comment.