bvaughn / react-resizable-panels

https://react-resizable-panels.vercel.app/
MIT License
3.87k stars 135 forks source link

Could I costomer localStorage key completely? #254

Closed caoxing9 closed 9 months ago

caoxing9 commented 9 months ago
function getPanelGroupKey(autoSaveId: string): string {
  return `react-resizable-panels:${autoSaveId}`;
}

I see this before save to localStorage,it has prefix react-resizable-panels,can i use the ${autoSaveId} without prefix,or it can be a optional?

looking forward your reply!

bvaughn commented 9 months ago

No. That isn’t supported.

Why would you want to? This isn’t something users see.

caoxing9 commented 9 months ago

No. That isn’t supported.

Why would you want to? This isn’t something users see.

beacase in my project, i collected all localstorage keys as constant, then, these key will used in part of other modules

bvaughn commented 9 months ago

Why though? Used how?

caoxing9 commented 9 months ago

Why though? Used how?

well, i think the original reason for concentrating localstorage key is that avoid conflict. may be it just an unusual scenario.

bvaughn commented 9 months ago

I don’t understand. Removing a prefix wouldn’t make it any less likely to have a name conflict.

I think this is not an issue I plan on trying to support, unless there is some other reason I am not aware of.

caoxing9 commented 9 months ago

I don’t understand. Removing a prefix wouldn’t make it any less likely to have a name conflict.

I think this is not an issue I plan on trying to support, unless there is some other reason I am not aware of.

Appreciate for answering me~