Skip to content

Conversation

@tsaichien
Copy link
Contributor

Summary:
Currently, the size of a jsi Array is immutable. Once the Array is
created, users can only set the element at an existing index, but not
append to it.

This change adds an Array::push API to improve ergonomics.

Changelog: [Internal]

Differential Revision: D82254334

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 12, 2025
@facebook-github-bot
Copy link
Contributor

@tsaichien has exported this pull request. If you are a Meta employee, you can view the originating diff in D82254334.

tsaichien added a commit to tsaichien/react-native that referenced this pull request Sep 12, 2025
Summary:

Currently, the size of a jsi `Array` is immutable. Once the `Array` is
created, users can only set the element at an existing index, but not
append to it.

This change adds an `Array::push` API to improve ergonomics.

Changelog: [Internal]

Differential Revision: D82254334
@facebook-github-bot
Copy link
Contributor

@tsaichien has exported this pull request. If you are a Meta employee, you can view the originating diff in D82254334.

tsaichien added a commit to tsaichien/react-native that referenced this pull request Sep 24, 2025
Summary:

Currently, the size of a jsi `Array` is immutable. Once the `Array` is
created, users can only set the element at an existing index, but not
append to it.

This change adds an `Array::push` API to improve ergonomics.

Changelog: [Internal]

Differential Revision: D82254334
@facebook-github-bot
Copy link
Contributor

@tsaichien has exported this pull request. If you are a Meta employee, you can view the originating diff in D82254334.

tsaichien added a commit to tsaichien/react-native that referenced this pull request Sep 24, 2025
Summary:

Currently, the size of a jsi `Array` is immutable. Once the `Array` is
created, users can only set the element at an existing index, but not
append to it.

This change adds an `Array::push` API to improve ergonomics.

Changelog: [Internal]

Differential Revision: D82254334
@facebook-github-bot
Copy link
Contributor

@tsaichien has exported this pull request. If you are a Meta employee, you can view the originating diff in D82254334.

tsaichien added a commit to tsaichien/react-native that referenced this pull request Sep 27, 2025
Summary:

Currently, the size of a jsi `Array` is immutable. Once the `Array` is
created, users can only set the element at an existing index, but not
append to it.

This change adds an `Array::push` API to improve ergonomics.

Changelog: [Internal]

Differential Revision: D82254334
@facebook-github-bot
Copy link
Contributor

@tsaichien has exported this pull request. If you are a Meta employee, you can view the originating diff in D82254334.

tsaichien added a commit to tsaichien/react-native that referenced this pull request Oct 1, 2025
Summary:

Currently, the size of a jsi `Array` is immutable. Once the `Array` is
created, users can only set the element at an existing index, but not
append to it.

This change adds an `Array::push` API to improve ergonomics.

Changelog: [Internal]

Reviewed By: lavenzg

Differential Revision: D82254334
@meta-codesync
Copy link

meta-codesync bot commented Oct 1, 2025

@tsaichien has exported this pull request. If you are a Meta employee, you can view the originating Diff in D82254334.

tsaichien added a commit to tsaichien/react-native that referenced this pull request Oct 3, 2025
Summary:

Currently, the size of a jsi `Array` is immutable. Once the `Array` is
created, users can only set the element at an existing index, but not
append to it.

This change adds an `Array::push` API to improve ergonomics.

Changelog: [Internal]

Reviewed By: lavenzg

Differential Revision: D82254334
tsaichien added a commit to tsaichien/react-native that referenced this pull request Oct 7, 2025
Summary:

Currently, the size of a jsi `Array` is immutable. Once the `Array` is
created, users can only set the element at an existing index, but not
append to it.

This change adds an `Array::push` API to improve ergonomics.

Changelog: [Internal]

Reviewed By: lavenzg

Differential Revision: D82254334
tsaichien added a commit to tsaichien/react-native that referenced this pull request Dec 16, 2025
Summary:

Currently, the size of a jsi `Array` is immutable. Once the `Array` is
created, users can only set the element at an existing index, but not
append to it.

This change adds an `Array::push` API to improve ergonomics.

Changelog: [Internal]

Differential Revision: D82254334
tsaichien added a commit to tsaichien/react-native that referenced this pull request Jan 22, 2026
Summary:

Currently, the size of a jsi `Array` is immutable. Once the `Array` is
created, users can only set the element at an existing index, but not
append to it.

This change adds an `Array::push` API to improve ergonomics.

Changelog: [Internal]

Differential Revision: D82254334
Summary:

After reviewing the feasibility of adding new Runtime functionality, we
realized the current state of `Runtime` makes it hard/inconvenient to
add new basic functionality. It requires creating a new interface (e.g.
`IRuntime2`) to declare the new APIs. Then, everywhere it is needed,
both the original `Runtime` and `IRuntime2` needs to passed in to access
both APIs.

After discussion, we decided to introduce `IRuntime`, which will declare
most of the `Runtime` functionalities. All "protected" APIs, which made
sense before interfaces were introduced, will now be public. The
protected static methods of `Runtime` will remain as is for the Friends
to access.

After we decided to cut "stable" (after incoming JSI improvements), new
functionalities will be added in `IRuntime2` interface. `IRuntime2` will
inherit `IRuntime` to make existing functionality easy to access.

Differential Revision: D89093651
Summary:

Currently, the size of a jsi `Array` is immutable. Once the `Array` is
created, users can only set the element at an existing index, but not
append to it.

This change adds an `Array::push` API to improve ergonomics.

Changelog: [Internal]

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants