Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

componentWillMount -> componentDidMount #29

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class AvatarComponent extends React.Component<Props> {
getChildContext(): {
optionContext: OptionContext;
};
componentWillMount(): void;
componentDidMount(): void;
componentWillReceiveProps(nextProps: Props): void;
render(): JSX.Element;
private updateOptionContext;
Expand All @@ -42,7 +42,7 @@ export declare class Piece extends React.Component<Props> {
getChildContext(): {
optionContext: OptionContext;
};
componentWillMount(): void;
componentDidMount(): void;
componentWillReceiveProps(nextProps: Props): void;
render(): JSX.Element;
private updateOptionContext;
Expand Down
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var AvatarComponent = /** @class */ (function (_super) {
AvatarComponent.prototype.getChildContext = function () {
return { optionContext: this.optionContext };
};
AvatarComponent.prototype.componentWillMount = function () {
AvatarComponent.prototype.componentDidMount = function () {
this.updateOptionContext(this.props);
};
AvatarComponent.prototype.componentWillReceiveProps = function (nextProps) {
Expand Down Expand Up @@ -73,7 +73,7 @@ var Piece = /** @class */ (function (_super) {
Piece.prototype.getChildContext = function () {
return { optionContext: this.optionContext };
};
Piece.prototype.componentWillMount = function () {
Piece.prototype.componentDidMount = function () {
this.updateOptionContext(this.props);
};
Piece.prototype.componentWillReceiveProps = function (nextProps) {
Expand Down
2 changes: 1 addition & 1 deletion dist/options/Selector.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class Selector extends React.Component<Props> {
optionContext: PropTypes.Requireable<OptionContext>;
};
private readonly optionContext;
componentWillMount(): void;
componentDidMount(): void;
componentWillUpdate(nextProps: Props & {
children?: React.ReactNode;
}): void;
Expand Down
2 changes: 1 addition & 1 deletion dist/options/Selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var Selector = /** @class */ (function (_super) {
enumerable: true,
configurable: true
});
Selector.prototype.componentWillMount = function () {
Selector.prototype.componentDidMount = function () {
var _a = this.props, option = _a.option, defaultOption = _a.defaultOption;
var optionContext = this.optionContext;
var defaultValue = (typeof defaultOption === 'string' ?
Expand Down
4 changes: 2 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default class AvatarComponent extends React.Component<Props> {
return { optionContext: this.optionContext }
}

componentWillMount () {
componentDidMount () {
this.updateOptionContext(this.props)
}

Expand Down Expand Up @@ -75,7 +75,7 @@ export class Piece extends React.Component<Props> {
return { optionContext: this.optionContext }
}

componentWillMount () {
componentDidMount () {
this.updateOptionContext(this.props)
}

Expand Down
2 changes: 1 addition & 1 deletion src/options/Selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class Selector extends React.Component<Props> {
return this.context.optionContext
}

componentWillMount () {
componentDidMount () {
const { option, defaultOption } = this.props
const { optionContext } = this
const defaultValue = (
Expand Down