[Vuejs]-How to use multiple condition passing in props and running block of code

3๐Ÿ‘

โœ…

  1. You are passing a variable on the props, not string, change :msg="msg" to :msg="'msg'" or msg="msg", and :msg="hi" to :msg="'hi'" or msg="hi"
  2. on HelloWorld component, you are supposed to to check if (this.msg === "msg") instead of if (val === "msg")

Demo: https://codesandbox.io/s/wispy-water-dxmuz

๐Ÿ‘คOwl

Leave a comment