Data binding not working for text field

Stack: Nextjs

Simple data binding not working until hot module reload.

I am using a data binding to a text field. This data is populated with fetch and text. Initially, the value is being rendered out as ‘undefined’ until I reload the page (via editing and saving).

The request is going through successfully every time without fail

NOTE: state.guid is defined

 if (Builder.isBrowser) {
    const res = await fetch(`doesn't matter/${state.guid}`);
    const name = await res.text();
    state.name = name;
    // Place code that you only want to run in the browser (client side only) here
    // For example, anything that uses document/window access or DOM manipulation
  }

I can confirm that the context is not populated on the initial render, even though there is a response.

Hi @rdonn!

This is a known behavior and we are working to fix it.

In the meantime, we recommend using Element data bindings feature to bind state data to a text field. You can read more about them at Building Interactivity Using State and Actions.

Let us know if you have any further questions or concerns. Thank you!