Skip to content

Commit

Permalink
Fix broken links in documentation (#6535)
Browse files Browse the repository at this point in the history
## Summary

Fix broken links in documentation

## Test plan

See CI test
  • Loading branch information
piaskowyk authored Sep 23, 2024
1 parent c130153 commit 87fecdc
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const workletContextObject = {

#### [Experimental] Worklet Classes

[Hermes](https://github.com/facebook/hermes), the JavaScript engine used by React Native, doesn't support classes. Class syntax requires [polyfilling](<https://en.wikipedia.org/wiki/Polyfill_(programming)>) before it can be used, which is problematic for the UI thread. To work around this, we coined the term of **Worklet Classes**. Worklet classes can be instantiated on the UI thread.
[Hermes](https://github.com/facebook/hermes), the JavaScript engine used by React Native, doesn't support classes. Class syntax requires [polyfilling](https://en.wikipedia.org/wiki/Polyfill_%28programming%29) before it can be used, which is problematic for the UI thread. To work around this, we coined the term of **Worklet Classes**. Worklet classes can be instantiated on the UI thread.

`__workletClass` is a special property that marks a class as a Worklet Class. It's value doesn't matter, but it's a good practice to use `true` as a value. `'worklet'` directive in methods will be ignored if the class has this property.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const items = [
link: 'https://twitter.com/bran_aust/status/1754907731536863670',
image: {
alt: 'brandon austin',
src: 'https://pbs.twimg.com/profile_images/1764586254145130496/gb774OEv_400x400.jpg',
src: 'https://pbs.twimg.com/profile_images/1807358745401286656/u6hI6CYo_400x400.jpg',
},
},
{
Expand All @@ -49,7 +49,7 @@ const items = [
link: 'https://twitter.com/codewithnomi_/status/1754910812584436199',
image: {
alt: 'syed noman',
src: 'https://pbs.twimg.com/profile_images/1739613764855738369/BG90fzKe_400x400.jpg',
src: 'https://pbs.twimg.com/profile_images/1830471268178546688/ZmDKS2cM_400x400.jpg',
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Examples
sidebar_label: Examples
---

The source code for the example (showcase) app is under the [`Example/`](https://github.com/software-mansion/react-native-reanimated/blob/main/Example/) directory.
The source code for the example (showcase) app is under the [`Example/`](https://github.com/software-mansion/react-native-reanimated/tree/v1/Example) directory.

In order to run it you need to run those commands (starting at main directory):

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ offset.value = withTiming(0, {
```

You may want to visit [easings.net](https://easings.net/) and check various easing visualizations.
To learn how to apply these please refer to the [Easing.ts](https://github.com/software-mansion/react-native-reanimated/blob/main/src/reanimated2/Easing.ts) file where all the easing related helper methods are defined.
To learn how to apply these please refer to the [Easing.ts](https://github.com/software-mansion/react-native-reanimated/blob/Reanimated2/src/reanimated2/Easing.ts) file where all the easing related helper methods are defined.

### Spring

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ test('stop in a middle of animation', () => {

More example tests you can see in our repository

- [SharedValue.test.js](https://github.com/software-mansion/react-native-reanimated/blob/main/__tests__/SharedValue.test.tsx)
- [Animation.test.js](https://github.com/software-mansion/react-native-reanimated/blob/main/__tests__/Animation.test.tsx)
- [SharedValue.test.js](https://github.com/software-mansion/react-native-reanimated/blob/Reanimated2/__tests__/SharedValue.test.js)
- [Animation.test.js](https://github.com/software-mansion/react-native-reanimated/blob/Reanimated2/__tests__/Animation.test.js)

## Recommended testing library

Expand Down
5 changes: 3 additions & 2 deletions packages/react-native-reanimated/scripts/validate-urls.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async function getFileAndUrls(dir) {
let urls = Array.from(fileContent.matchAll(urlRegex), (m) => m[0]);
urls = urls.filter((url) => !/({|})/.test(url));
return urls.length > 0
? urls.map((url) => ({ file: resource, url: url }))
? urls.map((url) => ({ file: resource, url }))
: [];
} else {
return [];
Expand All @@ -69,7 +69,8 @@ function validUrls(data) {
if (
currentData.url.includes('twitter.com') || // redirect issue
currentData.url.includes('blog.swmansion.com') || // authorization issue
currentData.url.includes('opensource.org') // request from GitHub actions probably blocked
currentData.url.includes('opensource.org') || // request from GitHub actions probably blocked
currentData.url.includes('good+first+issue') // sometimes we don't have any issues with this label
) {
index++;
sendRequest();
Expand Down

0 comments on commit 87fecdc

Please sign in to comment.