Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`Worklets.createSharedValue` can't set fields on an object value individually

オープン
#182 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp, react-native, typescript
領域
mobile-dev

調査の方向性

The issue names sharedvalue-tests.ts and the failing get_set_object_value test; run it first and compare the behavior with the regression introduced by PR 178. Done means mutating sharedValue.value.a and .b updates the stored object and the test passes, while preserving whole-value assignment.

索引モデルが issue の本文から書いたものです。

説明

I can't create a shared value that contains an object and then update the object's fields later. The get_set_object_value test in sharedvalue-tests.ts describes exactly what I am trying to do, and the test seems to be failing in release 1.2.0.

  get_set_object_value: () => {
    const sharedValue = Worklets.createSharedValue({ a: 100, b: 200 });
    sharedValue.value.a = 50;
    sharedValue.value.b = 100;
    return ExpectValue(sharedValue.value, { a: 50, b: 100 });
  },

The test output is:

 LOG  Running "WorkletsExample" with {"rootTag":11}
 LOG  Starting test with index 1
 LOG  Running test: get_set_object_value
 LOG  Loading react-native-worklets-core...
 LOG  Worklets loaded successfully
 LOG  ExpectValue, resolved: {"a": 100, "b": 200}
 LOG  ExpectValue, failed: Expected {"a":50,"b":100}, got {"a":100,"b":200}.
 LOG  Test: get_set_object_value failed.

I can only update the entire sharedValue like so:

  sharedValue.value = {
    a: 50,
    b: 100,
  };

I believe this is a regression of https://github.com/margelo/react-native-worklets-core/pull/178.

主要言語
C++
スター
792
フォーク
65
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

margelo/react-native-worklets-core のほかの issue

margelo/react-native-worklets-core の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。