TypeError: Cannot assign to read only property 'userId' of object '#<Object>'
16:16 03 Nov 2025

This code worked previously, but now that I upgraded my expo version I am getting the error "TypeError: Cannot assign to read only property 'userId' of object '#'".

This is the creation of the object

let currentUser: CurrentUser|null = null;

This is the assignment that is throwing the error.

currentUser.userId = data?.employee_id || "";

I'm not super familiar with React Native, so any help would be much appreciated.

I'm using expo version 54.0.21

typescript react-native expo typeerror