How to create local user data?

I use rust create user profile module, and I referenced the wall project, I tried to create local user data, always fail, do you know why?

let profile_store = storage::get_mut::();
profile_store.insert(principal_id, profile.clone());


I’m not sure if this is the cause but @AdamS removed that API recently:

An alternative approach is recommended by @roman-kashitsyn here:


Thanks for your answer, I’ll read the article.