Skip to content

refactor source utils#142

Open
aidenybai wants to merge 1 commit intobenjitaylor:mainfrom
aidenybai:refactor/element-source-package
Open

refactor source utils#142
aidenybai wants to merge 1 commit intobenjitaylor:mainfrom
aidenybai:refactor/element-source-package

Conversation

@aidenybai
Copy link

@aidenybai aidenybai commented Mar 12, 2026

No description provided.

Removes ~800 lines of internal React fiber traversal and stack-trace
probing code in favor of the element-source npm package, which provides
the same functionality with a simpler async API.

Made-with: Cursor
@vercel
Copy link

vercel bot commented Mar 12, 2026

@aidenybai is attempting to deploy a commit to the Benji Taylor's Projects Team on Vercel.

A member of the Team first needs to authorize it.

"prepublishOnly": "pnpm build"
},
"dependencies": {
"element-source": "^0.0.3"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this package is 7 years old contains one relevant function:

let getReactDebugSource = function (element: any) {
    for (var key in element) {
        if (key.startsWith('__reactInternalInstance$')) {
            return element[key]._debugSource;
        }
    }
    return null;
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexgorbatchev could you clarify what you mean?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean IMO this dependency is not necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants