Skip to content

Commit e9e1ce8

Browse files
committed
fix(docs): add default export to SnackPlayer code blocks
Expo Snack requires App.tsx to have a default export. The NumberFlow and TimeFlow component pages were missing it, causing Snack embeds to crash with "No default export of 'App.tsx' to render!"
1 parent e1720bc commit e9e1ce8

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

docs/content/docs/components/number-flow.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { useState } from 'react';
1818
import { View, Button } from 'react-native';
1919
import { NumberFlow } from 'number-flow-react-native';
2020
21-
function PriceCounter() {
21+
export default function PriceCounter() {
2222
const [price, setPrice] = useState(42.99);
2323
2424
return (
@@ -69,7 +69,7 @@ Every time `price` changes, each digit rolls independently to its new value.
6969
| `animated` | `boolean` | `true` | Set to `false` to disable all animations and update instantly. |
7070
| `respectMotionPreference` | `boolean` | `true` | Disables animations when the device "Reduce Motion" setting is on. |
7171
| `continuous` | `boolean` | `false` | When `true`, unchanged lower-significance digits spin through a full cycle during transitions, making the number appear to pass through intermediate values. |
72-
| `mask` | `boolean` | `true` | Enable edge gradient fade masking on digit slots. Uses `MaskedView` with View-strip gradients. |
72+
| `mask` | `boolean` | `true` | Enable edge gradient fade on digit slots. When `@rednegniw/masked-view` is installed, uses a MaskedView for smooth spatial gradient masking. Otherwise falls back to per-digit opacity fading. Set to `false` to disable masking entirely. |
7373
| `transformTiming` | `TimingConfig` | 900ms deceleration | Timing for layout transforms (position, width changes). Uses NumberFlow's signature deceleration curve. |
7474
| `spinTiming` | `TimingConfig` | Falls back to `transformTiming` | Timing for digit spin/rolling. |
7575
| `opacityTiming` | `TimingConfig` | 450ms ease-out | Timing for enter/exit opacity transitions. |

docs/content/docs/components/time-flow.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { useEffect, useState } from 'react';
2020
import { View } from 'react-native';
2121
import { TimeFlow } from 'number-flow-react-native';
2222
23-
function LiveClock() {
23+
export default function LiveClock() {
2424
const [now, setNow] = useState(Date.now());
2525
2626
useEffect(() => {

0 commit comments

Comments
 (0)