Skip to content

Commit

Permalink
Merge pull request #5683 from GeekyAnts/release/3.4.26-rc.3
Browse files Browse the repository at this point in the history
release 3.4.26-rc.3
  • Loading branch information
rayan1810 authored Feb 27, 2023
2 parents 07c2dfb + 9fa5f6b commit 904af92
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 17 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build

on:
push:
branches:
- master


jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# If you wish to fail your job when the Quality Gate is red, uncomment the
# following lines. This would typically be used to fail a deployment.
# - uses: sonarsource/sonarqube-quality-gate-action@master
# timeout-minutes: 5
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ NativeBase 3.0 is a rich component library with nearly 40 components.

JavaScript, React Native, Styled System

### Made with :heart: at [GeekyAnts](https://geekyants.com/?utm_source=nb-github&utm_medium=landing+page&utm_campaign=nativebase-github-cta)
NativeBase is an open-source project made by the tech-savvy geeks at GeekyAnts.
GeekyAnts is a group of React Native experts. Do [get in touch with us](https://geekyants.com/hire/?utm_source=nb-github&utm_medium=landing+page&utm_campaign=nativebase-github-hire-cta) for any help with your React Native project. Always happy to help!


## 10. Compatible Versions

| NativeBase | React Native |
Expand Down Expand Up @@ -187,3 +192,4 @@ Support this project with your organization. Your logo will show up here with a
## 14. License

Licensed under the MIT License, Copyright © 2021 GeekyAnts. See [LICENSE](https://github.com/GeekyAnts/NativeBase/blob/master/LICENSE) for more information.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"prettier --write"
]
},
"version": "3.4.26-rc.2",
"version": "3.4.26-rc.3",
"license": "MIT",
"private": false,
"main": "lib/commonjs/index",
Expand Down Expand Up @@ -68,7 +68,7 @@
"@types/react": "^16.9.19",
"@types/react-native": "~0.63.2",
"@types/tinycolor2": "^1.4.2",
"@types/use-subscription": "^1.0.0",
"@types/use-sync-external-store": "^0.0.3",
"babel-plugin-transform-remove-console": "^6.9.4",
"commitlint": "^8.3.5",
"eslint": "^7.10.0",
Expand Down Expand Up @@ -211,7 +211,7 @@
"lodash.uniqueid": "^4.0.1",
"stable-hash": "^0.0.2",
"tinycolor2": "^1.4.2",
"use-subscription": "^1.8.0"
"use-sync-external-store": "^1.2.0"
},
"directories": {
"example": "example",
Expand Down
1 change: 1 addition & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sonar.projectKey=GeekyAnts_NativeBase_AYYLs_jd-qOzU22UD5wX
11 changes: 8 additions & 3 deletions src/core/color-mode/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import type {
import { HybridContext } from './../hybrid-overlay/Context';
import type { IHybridContextProps } from './../hybrid-overlay/types';
import { AppState, useColorScheme as _useColorScheme } from 'react-native';
import { useSubscription } from 'use-subscription';
import { useSyncExternalStore } from 'use-sync-external-store/shim';

import { useNativeBaseConfig } from '../NativeBaseContext';

export const useColorMode = (): IColorModeContextProps => {
Expand Down Expand Up @@ -56,7 +57,11 @@ export const useAppState = () => {
// This if statement technically breaks the rules of hooks, but is safe
// because the condition never changes after mounting.
// eslint-disable-next-line react-hooks/rules-of-hooks
return useSubscription(subscription);
return useSyncExternalStore(
subscription.subscribe,
subscription.getCurrentValue,
subscription.getCurrentValue
);
}
};

Expand Down Expand Up @@ -100,7 +105,7 @@ export function useModeManager(
useEffect(() => {
if (colorModeManager) {
(async function getMode() {
let value = await colorModeManager.get(initialColorMode);
const value = await colorModeManager.get(initialColorMode);
if (value && value !== colorMode) {
setRawMode(value);
}
Expand Down
15 changes: 4 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3358,10 +3358,10 @@
resolved "https://registry.yarnpkg.com/@types/tinycolor2/-/tinycolor2-1.4.2.tgz#721ca5c5d1a2988b4a886e35c2ffc5735b6afbdf"
integrity sha512-PeHg/AtdW6aaIO2a+98Xj7rWY4KC1E6yOy7AFknJQ7VXUGNrMlyxDFxJo7HqLtjQms/ZhhQX52mLVW/EX3JGOw==

"@types/use-subscription@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@types/use-subscription/-/use-subscription-1.0.0.tgz#d146f8d834f70f50d48bd8246a481d096f11db19"
integrity sha512-0WWZ5GUDKMXUY/1zy4Ur5/zsC0s/B+JjXfHdkvx6JgDNZzZV5eW+KKhDqsTGyqX56uh99gwGwbsKbVwkcVIKQA==
"@types/use-sync-external-store@^0.0.3":
version "0.0.3"
resolved "https://registry.yarnpkg.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz#b6725d5f4af24ace33b36fafd295136e75509f43"
integrity sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==

"@types/yargs-parser@*":
version "15.0.0"
Expand Down Expand Up @@ -12371,13 +12371,6 @@ use-subscription@^1.0.0:
dependencies:
object-assign "^4.1.1"

use-subscription@^1.8.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/use-subscription/-/use-subscription-1.8.0.tgz#f118938c29d263c2bce12fc5585d3fe694d4dbce"
integrity sha512-LISuG0/TmmoDoCRmV5XAqYkd3UCBNM0ML3gGBndze65WITcsExCD3DTvXXTLyNcOC0heFQZzluW88bN/oC1DQQ==
dependencies:
use-sync-external-store "^1.2.0"

use-sync-external-store@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a"
Expand Down

0 comments on commit 904af92

Please sign in to comment.