Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove _debugID field from Fiber #21558

Closed
bvaughn opened this issue May 25, 2021 · 9 comments · Fixed by #21570
Closed

Remove _debugID field from Fiber #21558

bvaughn opened this issue May 25, 2021 · 9 comments · Fixed by #21570

Comments

@bvaughn
Copy link
Contributor

bvaughn commented May 25, 2021

This DEV-only field was added in 836331b by @sebmarkbage but it's not being used anymore to my knowledge.

@Pulkit3234
Copy link
Contributor

@bvaughn sir, can I work upon this issue?

@bvaughn
Copy link
Contributor Author

bvaughn commented May 25, 2021

This issue is all yours @Pulkit3234 😄

I've added the "good first issue (taken)" label so that others will know not to start work on the issue. If you change your mind about the issue, no worries! Just let me know so that I can remove the label and free it up for someone else to claim.

Cheers!

@Pulkit3234
Copy link
Contributor

Thanks sir, hope this time I make a successful PR, haha!

@jacty
Copy link

jacty commented May 26, 2021

I am currently using _debugID to tell which Fiber node get issues. It is quite useful for me to find the dirty Fiber when there are many similar Fibers going through reconciler phase. As you said they are not used anymore, if we have any other better solutions to target a dirty Fiber ?

@Pulkit3234
Copy link
Contributor

@bvaughn sir, I am not able to find the fiber file in the scripts folder, so can you kindly guide me on how do I proceed with working upon this issue?

@bvaughn
Copy link
Contributor Author

bvaughn commented May 26, 2021

@jacty Fibers are an internal data structure and aren't meant to be accessed or used by non-React code. Can you explain more about what you're doing and how?

@Pulkit3234 React source code isn't in the "scripts" folder. It's in the "packages" folder. I suggest searching the project for _debugID to see which places need to be updated. 😄

@jacty
Copy link

jacty commented May 26, 2021

@jacty Fibers are an internal data structure and aren't meant to be accessed or used by non-React code. Can you explain more about what you're doing and how?

Sometimes, it is hard to figure out where the property is. Take an example, if I want to get a state in children components but failed, I will go to Fiber to check why and which Fiber failed to get the state by setting breakpoint based on debugID one by one instead of basing on the complicated state object.

@bvaughn
Copy link
Contributor Author

bvaughn commented May 26, 2021

@jacty Okay, so long as you aren't writing+releasing code that uses Fibers (or this field) then that sounds fine :) You could set a conditional breakpoint based on type maybe (e.g. fiber.type === SomeFunctionComponent).

@Pulkit3234
Copy link
Contributor

@bvaughn sir, I made the changes and submitted the pr as well, can you please have a look at it 😄.

bvaughn added a commit that referenced this issue May 26, 2021
* Removed _debugID field from Fiber
* Update ReactFunctionComponent-test.js

Co-authored-by: Brian Vaughn <brian.david.vaughn@gmail.com>
koto pushed a commit to koto/react that referenced this issue Jun 15, 2021
)

* Removed _debugID field from Fiber
* Update ReactFunctionComponent-test.js

Co-authored-by: Brian Vaughn <brian.david.vaughn@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants