Skip to content

Conversation

@Vitao18
Copy link

@Vitao18 Vitao18 commented Nov 9, 2019

Closes #43

@sibelius
Copy link

@a-x- can you help us review this?

debug('init printable', this.props.name);
const isSingle = (this.props.main || this.props.single);
this.context.printProvider && this.context.printProvider.regPrintable(this.props.name, <Print {...this.props} />, isSingle);
useEffect(() => {
Copy link
Owner

Choose a reason for hiding this comment

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

looks like this useEffect should be componentDidMount equivalent, because, e.g. window.matchMedia('print').onchange must be called at once,

so, as I understand, we need add empty list of dependencies ([]) here: useEffect(() => {...}, []);

Copy link
Owner

@a-x- a-x- Nov 23, 2019

Choose a reason for hiding this comment

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

also, we need to verify all the useEffects' dependencies

Copy link

@sibelius sibelius left a comment

Choose a reason for hiding this comment

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

I don’t think this influence the react devtool

@a-x- a-x- marked this pull request as ready for review November 23, 2019 15:10
@Vitao18
Copy link
Author

Vitao18 commented Nov 23, 2019

I'll check the comments and suggestions and work on the changes later
Thanks for the valuable input, very glad to help

@a-x-

This comment has been minimized.

@sibelius
Copy link

sibelius commented Feb 3, 2020

@a-x- any progress on this?

anything we can do to help?

@Vitao18
Copy link
Author

Vitao18 commented Jun 24, 2020

@a-x- Hey, anything I can do to help to get this merged?
I'll check the refactor again to see if there's something missing

Just let me know :)

@sibelius
Copy link

can we merge and release a new version?

it would be cool to add some react-testing-library tests after this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

make it work in strict mode

3 participants