bobby's avatar

Bobby @bobby Yd1xy0eh3o7

Bio:
A really awesome cool slick ninja dinosaur thingy 🦖  

Power Remaining: 🟩⬜️⬜️⬜️⬜️⬜️ 「69/420」

Location: Earth

Recent Comments

  • On Multi View Interfaces in Bubble Tea:

    For those who are wondering, the root state is never changed. Meaning, it can hold data and state. while calling the `SwitchScreen()` method on a screen, the screen itself is initialized. So the data related to the child screen will be reset, but the root screen which is responsible for switching the screens will not be changed and if a variable is defined in the root screen file, it can be used in all the other screens - other screens shall be able to read and write to this particular variable. Here's an example:

    type rootScreenModel struct  {
    model tea.Model // this will hold the current screen model
    }

    global_variable := 10;

    //... other root screen implementation


    In any other screen defined in `screens/` we can just access it:

    // ... other functions
    func (m screenTwoModel) View() string {
    str := fmt.Sprintf("%s This is child screen... and the global variable is: %d", m.spinner.View(), global_variable)
    return str
    }

  • On Building a Simple User Presence:

    Yes. That's correct. I did, in fact, reference Google Chrome's developer tools in the article. In Chrome, you go to the "Applications" tab > Storage section to see the cookies. And yes, this location may vary per browser, but the general idea remains the same, i.e. you are looking for a cookie called `user_uuid`.