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

Working with screen resize #7

Closed
Quadriphobs1 opened this issue Apr 9, 2018 · 1 comment
Closed

Working with screen resize #7

Quadriphobs1 opened this issue Apr 9, 2018 · 1 comment

Comments

@Quadriphobs1
Copy link

I understand the package works and detect the screen when the page is loading but is there a way to also make the detection upon screen resize like when you use chrome inspect to change screen responsiveness. I have been trying to fix this async but don't seems to get maybe a little help would do

@duskload
Copy link
Owner

Since detection is based on user-agent, it has to be loaded or reloaded to switch its type (mobile to browser or visa versa).

I think you can achieve this by adding an event listener on 'resize' to your application which catches change of window innedWidth and innerHeight and trigger component rerender with shouldComponentUpdate.

But for now, I am don't have plans for adding of such a feature to this package.

Thanks for your report.

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

No branches or pull requests

2 participants