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

Hot reloading #10

Open
ptrk8 opened this issue Sep 12, 2018 · 0 comments
Open

Hot reloading #10

ptrk8 opened this issue Sep 12, 2018 · 0 comments

Comments

@ptrk8
Copy link

ptrk8 commented Sep 12, 2018

Just wondering if webpack hot-reloading should be working with this component?

I'm using vue-media in the following way. When I change "hideTextWidth" which changes the media breakpoint of my component, I have to manually refresh my app every time in order to see the changes to flow through.

<template>
	<div class="logo-container">
		<img class="logo" src="../../some_url" alt="logo">
		<media v-bind:query="width">
			<span class="logo-text">LOGO</span>
		</media>
	</div>
</template>

<script>
	import media from 'vue-media';

    export default {
    	props: [ "hideTextWidth" ],
    	components: {
    		media,
    	},
    	computed: {
    		width() {
    			if (this.hideTextWidth) {
    				return {
    					minWidth: this.hideTextWidth,
    				};
    			}
    			return {};
    		}
    	},
    };
</script>
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

1 participant