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

Code inspection does not always work with Fragment + empty component #980

Open
jakmak24 opened this issue Feb 20, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@jakmak24
Copy link

jakmak24 commented Feb 20, 2025

Description
I've noticed that code inspector doesn't always work for our project. We often use empty components with some sideeffects. I was able to track it down and create a minimal repro example.

Code inspection does not work for the following example:
Right Clicking View A does not open the inspector and Left clicking doesn't navigate to code


function C() {
	return (
		<React.Fragment>
			<B />
			<A />
		</React.Fragment>
	);
}

function A() {
	return <View style={{ height: 100, backgroundColor: 'red' }} />;
}

function B() {
	return null;
}

It works correctly if we switch the order

function C() {
	return (
		<React.Fragment>
			<A />
			<B />
		</React.Fragment>
	);
}

or wrap in View

function C() {
	return (
		<View>
			<B />
			<A />
		</View>
	);
}

Environment

Radon IDE : 1.3.1
React-native: 0.74
React: 18.2.0
Expo: 51

@jakmak24 jakmak24 added the bug Something isn't working label Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant