How to use Context Data

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ธ.ค. 2024

ความคิดเห็น • 5

  • @ivaylomanolov1455
    @ivaylomanolov1455 ปีที่แล้ว +1

    interesting video! Thanks!

  • @upper_deck
    @upper_deck 6 หลายเดือนก่อน

    Why is it necessary to play music in the background?

    • @ruwindustries
      @ruwindustries  6 หลายเดือนก่อน

      It is not necessary - I just like the feel of it, especially for parts without voice over

  • @neereda5138
    @neereda5138 ปีที่แล้ว

    this programing language make no sense.
    i just tried store array object in Global and I make function somewhere and get that array
    > let a = global.get("myobject")
    somehow the global object is change without calling 'global.set()'
    > a[0] = "this is annoying"
    it make debugging process hard to track where node that change global object.

    • @ruwindustries
      @ruwindustries  ปีที่แล้ว +1

      That's because Arrays in JavaScript get passed on as a reference and not by value. This means you don't get the actual values but a pointer referencing the global variable. To solve this you have to make a Deep Copy of the Array. The only way I know of (I don't like it at all) is to use the following syntax. let a = JSON.parse(JSON.stringify(global.get("myobject"));
      Maybe the following article helps.
      dev.to/samanthaming/how-to-deep-clone-an-array-in-javascript-3cig