title: How do I retrieve custom properties on a LaunchDarkly user?
body: <p>I'm trying to add an attribute to a LaunchDarkly user, and retrieve it on subsequent reloads.</p>
  <p>Here's a simplified example:</p>
  <pre><code>import { withLDProvider } from 'launchdarkly-react-client-sdk';
  export default withLDProvider({
    clientSideID: 'your-client-side-id',
    user: {
      &quot;key&quot;: &quot;abc&quot;,
    },
    options: { /* ... */ }
  })(YourApp);
  
  const YourApp = () =&gt; {
    const client = useLDClient();
    useEffect(() =&gt; {
      if (client) {
        const user = client.getUser();
        
        // Expectation: logs &quot;{ key: 'abc' } on first load,
        // and &quot;{ key: 'abc', firstName: 'Evan' }&quot; on subsequent reloads
        console.log('Received', user);
  
        const updatedUser = { ...user, firstName: 'Evan' };
        client.identify(updatedUser);
      }
    }
  
    ...
  }
  </code></pre>
  <p>What I'm seeing is that after reloading the page, the 'firstName' attribute is not being retrieved.</p>
  <p>Expected:</p>
  <ul>
  <li>First load: <code>Received { key: 'abc' }</code></li>
  <li>Second load: <code>Receieved { key: 'abc', firstName: 'Evan' }</code></li>
  </ul>
  <p>Reality:</p>
  <ul>
  <li>First load: <code>Received { key: 'abc' }</code></li>
  <li>Second load: <code>Received { key: 'abc' }</code></li>
  </ul>
  <p>Am I misunderstanding what <code>getUser()</code> is supposed to do?</p>
  <p>My understanding is that calling <code>identify()</code> should update the user profile. I would think that on subsequent <code>getUser()</code> calls with the same <code>key</code>, I should get back the <code>firstName</code> that is added when calling <code>identify()</code> but that's not what I'm seeing.</p>
  <p>I've read through all the docs and I can't tell if this is expected behavior, or if I'm doing something wrong.</p>
  <p>I'm using the React Client SDK (&quot;launchdarkly-react-client-sdk&quot;: &quot;^2.22.2&quot;)</p>