# Data binding not working for text field

**URL:** <https://forum.builder.io/t/data-binding-not-working-for-text-field/2694>\
**Category:** Bugs\
**Created:** [October 4, 2022, 11:43pm UTC](https://forum.builder.io/t/data-binding-not-working-for-text-field/2694 "2022-10-04T23:43:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rdonn](https://avatars.discourse-cdn.com/v4/letter/r/9f8e36/32.png) [@rdonn](https://forum.builder.io/u/rdonn)\
**Post date:** [October 4, 2022, 11:43pm UTC](https://forum.builder.io/t/data-binding-not-working-for-text-field/2694/1 "2022-10-04T23:43:58Z")

</div>

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

```nohighlight
 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.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/5/5db821a2f45e7c8ebec49dcdfe031188680a9e50.png)

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [October 7, 2022, 4:47am UTC](https://forum.builder.io/t/data-binding-not-working-for-text-field/2694/2 "2022-10-07T04:47:18Z")

</div>

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](https://www.builder.io/c/docs/guides/state-and-actions).

 ![Screenshot 2022-10-07 at 10.09.58 AM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/6/616ad57dc8d55fbecfe69465965edb0e0d66614b.png)

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