Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beasy-mobile
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
G
beasy-mobile
Commits
559af245
Commit
559af245
authored
May 06, 2024
by
G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
short fix to avoid the animation to replay everytime a state value change in a parent component
parent
23c5cdbb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
ContainerBorderTopCurved.tsx
src/components/ContainerBorderTopCurved.tsx
+2
-2
No files found.
src/components/ContainerBorderTopCurved.tsx
View file @
559af245
...
@@ -6,13 +6,13 @@ import Box from "./bases/Box";
...
@@ -6,13 +6,13 @@ import Box from "./bases/Box";
type
Props
=
{
children
:
React
.
ReactNode
};
type
Props
=
{
children
:
React
.
ReactNode
};
const
ContainerBorderTopCurved
=
({
children
}:
Props
)
=>
{
const
ContainerBorderTopCurved
=
({
children
}:
Props
)
=>
{
const
animated
=
new
Animated
.
Value
(
0
);
const
animated
=
new
Animated
.
Value
(
0
);
// biome-ignore lint/correctness/useExhaustiveDependencies: <we do not want animation to replay everytime this component rerender>
useEffect
(()
=>
{
useEffect
(()
=>
{
Animated
.
spring
(
animated
,
{
Animated
.
spring
(
animated
,
{
toValue
:
1
,
toValue
:
1
,
useNativeDriver
:
true
,
useNativeDriver
:
true
,
}).
start
();
}).
start
();
},
[
animated
]);
},
[]);
return
(
return
(
<
Animated
.
View
<
Animated
.
View
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment