Skip to content

You must be logged in to vote

@hannojg I'll copy my answer from a different discussion:

The Command abstraction is a way to tell a native component to do something bypassing the renderer. You should not expect any return value from it. The return value from a command generally may depend on many things other than component itself. This makes such component non-composable. This breaks one of React's fundamental principles. This is also the reason why it only accepts primitive types. We may add some more capabilities in the future, but there are currently no plans for that.

I would recommend to try finding a way to implement this behaviour using Native Modules.

Replies: 12 comments 27 replies

You must be logged in to vote
0 replies

This comment has been hidden.

@ZihanChen-MSFT

@cipolleschi

cipolleschi Jan 30, 2023
Maintainer Author

@troZee

troZee Jan 30, 2023
Collaborator

This comment has been hidden.

@ZihanChen-MSFT

@ZihanChen-MSFT

You must be logged in to vote
11 replies
@Fa7

@cipolleschi

cipolleschi Jul 9, 2024
Maintainer Author

@bmahajanZ

@zeevenn

@cipolleschi

cipolleschi Jun 5, 2025
Maintainer Author

You must be logged in to vote
0 replies

This comment has been hidden.

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
3 replies
@cipolleschi

cipolleschi May 15, 2023
Maintainer Author

@jerielng

@cipolleschi

cipolleschi May 16, 2023
Maintainer Author

You must be logged in to vote
5 replies
@oliviermartin

@cortinico

@oliviermartin

@cortinico

@dmytrorykun

You must be logged in to vote
3 replies
@hannojg

hannojg May 28, 2024
Collaborator

@hannojg

hannojg May 28, 2024
Collaborator

@dmytrorykun

Answer selected by hannojg

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet