chore: fix playground hydration error (#758)

This commit is contained in:
Daniel Roe 2021-10-12 15:19:02 +01:00 committed by GitHub
parent cc410a31a6
commit eaa16f2a7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,10 @@ const greetings = [
'こんにちは',
'你好'
]
const hello = greetings[Math.random() * greetings.length | 0]
const hello = useState('hello')
if (!hello.value) {
hello.value = greetings[Math.random() * greetings.length | 0]
}
</script>
<style scoped>