forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate BridgelessReactStateTracker to Kotlin (facebook#43792)
Summary: Pull Request resolved: facebook#43792 Changelog: [Internal] Differential Revision: D55628784
- Loading branch information
1 parent
1252f63
commit 013e0b3
Showing
2 changed files
with
26 additions
and
32 deletions.
There are no files selected for viewing
32 changes: 0 additions & 32 deletions
32
...ve/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessReactStateTracker.java
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
...tive/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessReactStateTracker.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
package com.facebook.react.runtime | ||
|
||
import com.facebook.common.logging.FLog | ||
|
||
internal class BridgelessReactStateTracker(private val shouldTrackStates: Boolean) { | ||
|
||
private companion object { | ||
private const val TAG = "BridgelessReact" | ||
} | ||
|
||
private val states = mutableListOf<String>() | ||
|
||
protected fun enterState(state: String) { | ||
FLog.w(TAG, state) | ||
if (shouldTrackStates) { | ||
states.add(state) | ||
} | ||
} | ||
} |