Animation stops at frame 1 in Phaser 3

In a specific section of my code, the animation for a sprite stops at frame 1 when I run this.sprite.anims.play("key", true).

I have ran animations in other sections of my code and they have ran perfectly fine. However, for some reason, in this section, it is stopping at frame one. Here is the section:

In the update() function:


if (this.TIMER_DONE) {
  this.zeph.anims.play("walk_zeph-left", true)
  this.zeph.x += this.zeph_x_vel
  this.zeph_speech.visible = false
  this.t.setText("")
  if (this.zeph.x == 352) {
    this.zeph_x_vel = 0
    this.zeph.anims.play("walk_zeph-front", true)
    }
  }  

Basically, I have a timer. When the timer is done, I want the sprite to walk until it hits a specific coordinate. That part works perfectly fine. And then, when it does hit that coordinate, I want it to stop walking by setting the this.zeph_x_vel equal to 0. That part works fine too.

The only part that isn’t working is the this.zeph.anims.play() part. It is playing the animation, but only the first frame. I have checked this with the other animations (ie, with the other keys), and the same thing is happening.

Here is my animation set_up:

this.anims.create({
            key: 'walk_zeph-front',
            frames: this.anims.generateFrameNumbers('zeph-front', {start: 0, end: 3}),
            frameRate: 8,
            repeat: -1
        })

I don’t get any errors in the console, so, I’m not exactly sure what’s happening. Any help would be greatly appreciated.

Why is my newly created Next.js app with NextAuth and Prisma throwing this error “TypeError: Cannot read properties of undefined (reading ‘exec’)”

Just started this project, used create-next-app@latest and installed prisma, nextauth and prisma adapter according to latest docs. DB is properly configured and tested, next secret is set, middleware.ts, auth.ts, and prisma.ts copied from official docs, Google oauth creds are set correctly. Here is the error output

Runtime Error


TypeError: Cannot read properties of undefined (reading 'exec')

Call Stack
10

Hide 10 ignore-listed frame(s)
[project]/node_modules/@prisma/client/runtime/library.js [middleware-edge] (ecmascript)
node_modules/@prisma/client/runtime/library.js (4:6678)
<unknown>
[turbopack]/browser/runtime/base/dev-base.ts (205:21)
runModuleExecutionHooks
[turbopack]/browser/runtime/base/dev-base.ts (265:5)
instantiateModule
[turbopack]/browser/runtime/base/dev-base.ts (203:5)
getOrInstantiateModuleFromParent
[turbopack]/browser/runtime/base/dev-base.ts (132:10)
esmImport
[turbopack]/shared/runtime-utils.ts (214:18)
[project]/node_modules/@auth/prisma-adapter/index.js [middleware-edge] (ecmascript)
node_modules/@auth/prisma-adapter/index.js (1:1)
<unknown>
[turbopack]/browser/runtime/base/dev-base.ts (205:21)
runModuleExecutionHooks
[turbopack]/browser/runtime/base/dev-base.ts (265:5)
instantiateModule
[turbopack]/browser/runtime/base/dev-base.ts (203:5)

Current dependency list:

 "dependencies": {
    "@auth/prisma-adapter": "^2.8.0",
    "@prisma/client": "^6.5.0",
    "next": "^15.2.2",
    "next-auth": "^5.0.0-beta.25",
    "react": "^19",
    "react-dom": "^19"
  },
  "devDependencies": {
    "@eslint/eslintrc": "^3",
    "@types/node": "^20",
    "@types/react": "^19",
    "@types/react-dom": "^19",
    "eslint": "^9",
    "eslint-config-next": "15.2.2",
    "prisma": "^6.5.0",
    "typescript": "^5"
  }

Been digging around searching, chatting with Cursor, changing lots of stuff around, deleted node_modules and reinstalled, generated prisma client again. Nothing is working.

Display 6 videos from our YouTube channel using a search term

Can anyone illustrate how to resolve the following errors and allow me to authenticate through the oAuth client ID to return 6 videos from our youtube channel using a search term?

POST https://accounts.google.com/_/IdpIFrameHttp/cspreport/fine-allowlist 400 (Bad Request)Understand this errorAI
cb=gapi.loaded_0?le=scs:169

GET https://content.googleapis.com/discovery/v1/apis/youtube/v3/search?pp=0&fields=kind%2Cname%2Cversion%2CrootUrl%2CservicePath%2Cresources%2Cparameters%2Cmethods%2CbatchPath%2Cid&key=API-KEY 404 (Not Found)

cb=gapi.loaded_0?le=scs:153 Uncaught
{error: ‘idpiframe_initialization_failed’, details: ‘You have created a new client application that use…i/web/guides/gis-migration) for more information.’}
details:”You have created a new client application that uses libraries for user authentication or authorization that are deprecated. New clients must use the new libraries instead. See the Migration Guide for more information.”
error: “idpiframe_initialization_failed”

// Load the Google API client library
function loadClient() {
    import("https://apis.google.com/js/api.js").then(() => {
    gapi.load('client', initialize);
    }
)}

// Initialize the API client
function initialize() {
    gapi.client.init({
        'apiKey': 'API-KEY',
        'clientId': 'CLIENT-ID.apps.googleusercontent.com',
        'scope': 'https://www.googleapis.com/auth/youtube.readonly',
        'discoveryDocs': ['https://www.googleapis.com/discovery/v1/apis/youtube/v3/search']
    }).then(function () {
        // Call the API to search for videos
        searchVideos('SEARCH-TERM');
    });
}

// Search for videos using the YouTube API
function searchVideos(searchTerm) {
    return gapi.client.youtube.search.list({
        'part': 'snippet',
        'q': searchTerm,
        'type': 'video',
        'maxResults': 6
    }).then(function(response) {
        displayVideos(response.result.items);
    }, function(error) {
        console.error('Error: ' + error);
    });
}

// Display videos on the WordPress page
function displayVideos(videos) {
    const videoContainer = document.getElementById('video-container');
    videoContainer.innerHTML = '';
    videos.forEach(video => {
        const videoElement = document.createElement('iframe');
        videoElement.src = 'https://www.youtube.com/embed/' + video.id.videoId;
        videoElement.width = '300';
        videoElement.height = '200';
        videoElement.allow = 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture';
        videoElement.allowFullscreen = true;
        videoContainer.appendChild(videoElement);
    });
}

// Load the Google API client library on page load
window.onload = loadClient;// JavaScript Document
<div id="video-container"> </div>

Javascript for loop inside a Mocha before block is not completing before tests start running

There have been several posts on this, but I think this is a new twist. Using Mocha, my test case code is getting hit before the before block even starts.

The before block is looping through a list of test cases, and creating test accounts and making purchases for that account, for each test case. The test itself is checking the database to ensure the purchase is recorded correctly, in the correct currency, etc.

Part of the unique aspect is that each test case is being updated with some additional properties during setup that are then used during validation.

The pseudo-code looks like this:

describe('Validate purchasing product shows up in db', function () {

    let testCases = [ 
        { testCaseId: 'T1234', country: 'United States', currency: 'USD', purchase: [camera: 'Canon EOS 90D', accessory: 'Leica Table Tripod'}]},
        { testCaseId: 'T56786', country: 'Japan', currency: 'Yen', purchase: [camera: 'Sony A7RV', accessory: 'Leica Table Tripod'}]},

    ];
    
    before(async function() {
        testCases = await setUpAccountsAndPlaceOrders(testCases).then((tests) => { return tests;});
    });

    let testCaseOrder = 0;

    testCases.forEach(function(tc) {
        let description = createTestDescription(tc);
        console.log(description);

        it(description, async() => 
        {
            // Look up user by email: tc.email
            // Validate users orders shows up in database
        });
    });
});

async function setUpAccountsAndPlaceOrders(testCases)
{
    return new Promise(function (resolve) {
        setTimeout(async function () {
            await browser.deleteCookies();
            await browser.navigateTo('https://beta.cameramarketplace.com');
            await Cart.plans.navigateTo();

            for(let i = 0; i < testCases.length; i++)
            {
                // create an account
                // place the order
                testCases[i].email = // new account's email
                testCases[i].uiPrice = //value shown in UI invoice
            }
            resolve(testCases);
        }, 30000)
    });
}

The test always fails. If I put a breakpoint inside the setUpAccountsAndPlaceOrders function and then one on the it statement, the it statement always hits first.
Any idea what I am missing here?

Google Places API returns “This API project is not authorized to use this API” despite correct setup

I’m working with Google Places API and encountering the following error:

{

"error_message": "This API project is not authorized to use this API.",

"status": "REQUEST_DENIED"

}

Here’s what I’ve done so far:

  1. API Enabled: I’ve confirmed that the Places API is enabled in the Google Cloud Console.

  2. API Key: I’ve generated an API key and included it in my code.

  3. Billing: Billing is enabled on the project, and the account is active.

  4. Permissions: I’ve checked the permissions, and the API key has been authorized to use the Places API.

  5. Token: I’ve also checked my OAuth token, and it is valid for use.

Despite all this, I’m still receiving the error. I’ve double-checked every setting, and everything seems correct, but the API still returns this authorization error.

Does anyone have any insights on why this might be happening or any other steps I can try to fix it? Any help would be greatly appreciated!

ReactJS : anonymous function accesses an old memo state

I’m learning ReactJS, and performance optimisation. I just stumbled on a case I just cannot explain.

Below is the smallest code I could write showing the “issue” / strange behavior.

  • I have a text field changing a state => query
  • I have a memo changing its value when query changes.
  • I have a function displaying this memo.
  • I make a callback calling this function.
  • I use the callback on a button.
import { useState, useMemo, useCallback } from "react";

export function App(props) {
  const [query, setQuery] = useState('');

  const memoT = useMemo(() => (query + '_memo'), [query]);

  function callback() {
    console.log("callback : "+memoT)
  }

  const testCall = useCallback(() => callback(), []);

  return (
      <>
          <input
              type="text"
              value={query}
              onChange={event => setQuery(event.target.value)}
          />
          <p>{memoT}</p>
          <button onClick={testCall} >run testCall</button>
      </>
  );
}

What I would have expected :
When called, callback read the memoT value from its object (maybe phishy here), and displays whatever is typed in the textfield + _memo.

What I have :
When read inside callback, the value of memoT is always its initial value.
But when read outside (actually when called in the App function), the memoT is correct, and is the one displayed.

What I understand/suspects :
When the callback is created, it “remembers” the current state, and the memoT reference at that point ? But then … how to I get my callback to read its object state ?

Loading a larger file with ffmpeg crashes on safari mobile

My use case is to extract audio from video file to minimize the size of sent file over network. Everything works fine on a computer (chrome, safari) but it’s either stuck or crashes on ios safari. AFAIK it crashes not while executing the ffmpeg command, but while trying to load the input file, which is quite big (500MB+).

I load the ffmpeg like this:

  const baseURL = "https://unpkg.com/@ffmpeg/[email protected]/dist/esm";
  await ffmpeg.load({
    coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`, "text/javascript"),
    wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`, "application/wasm"),
    workerURL: await toBlobURL(
      `${baseURL}/ffmpeg-core.worker.js`,
      "text/javascript"
    ),
  });

And I try to load the file like this:

await ffmpeg.writeFile(inputFileName, await fetchFile(file));

But it does not go past this step. How can I work around this limitation? Is there any other way to load larger files?

Thank you.

Javascript can output the a js script using it’s file name

I have a simple html file:

  • it has script in the head. Control.js as an example.
  • I tried to console.log the script using the the filename, ‘Control’. it returns the definition or the script of the file.
  • Does this mean, the browser will auto declares a variable on every script tag using the filename?
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script type="text/javascript" src="Control.js"></script>
    <title>Document</title>
</head>
<body>
    <script>
        console.log(Control);
    </script>
</body>
</html>

I can’t find the reason for this. is this a normal behaviour?

Refreshing Discord events

Hello so I wanted to refresh my events, I thought i knew how but i guess i didn’t. It enters the forEach loop although it errors out at the part where it deletes the require cache

const fs = require('fs');
const path = require('path');

function reloadEvent() {
    try {
        const modelsPath = path.join(__dirname, '../src/events');
        const modelFiles = fs.readdirSync(modelsPath).filter(file => file.endsWith('.js'));

        modelFiles.forEach((file) => {
            try {
                console.log("Entered for each");
                const filePath = path.join(modelsPath, file);
                delete require.cache[require.resolve(filePath)];
                console.log(`Deleting cache for: ${file}`);
                const newEvent = require(filePath);
                console.log(`Requiring event: ${file}`);
                if (newEvent.once) {
                    client.once(newEvent.name, (...args) => newEvent.execute(...args));
                } else {
                    client.on(newEvent.name, (...args) => newEvent.execute(...args));
                }
                console.log(`Reloaded event: ${newEvent.name}`);
            } catch (error) {
                console.error(`Failed to reload event: ${file}`, error);
                
            }
        })

        console.log('events reloaded');
    } catch (error) {
        console.error(`Error refreshing events: ${error}`);
    }
}

module.exports = reloadEvent;

If there is an actual way of refreshing discord events, please tell me. I haven’t seen anything in the guides

Uncaught SyntaxError: Unexpected token ‘{‘ (at index.html:20:35) and Uncaught SyntaxError: Unexpected token ‘<' (at bundle.js:1:1)

While trying to run application locally I am getting these errors, I just upgraded to webpack-dev-server from 2.11.3 to 4.15.2.
Below are my configs and files

webpack.config.js

const autoprefixer = require('autoprefixer');
const postcssFlexbugsFixes = require('postcss-flexbugs-fixes');
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
const eslintFormatter = require('react-dev-utils/eslintFormatter');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const getClientEnvironment = require('./env');
const paths = require('./paths');

const babelRuntimeEntry = require.resolve('babel-preset-react-app');
const babelRuntimeEntryHelpers = require.resolve(
  '@babel/runtime/helpers/esm/assertThisInitialized',
  { paths: [babelRuntimeEntry] },
);
const babelRuntimeRegenerator = require.resolve('@babel/runtime/regenerator', {
  paths: [babelRuntimeEntry],
});

const publicPath = '/';
const publicUrl = '';
const env = getClientEnvironment(publicUrl);

module.exports = {
  mode: 'development',
  devtool: 'cheap-module-source-map',
  entry: [
    require.resolve('./polyfills'),
    require.resolve('react-dev-utils/webpackHotDevClient'),
    paths.baseline,
    paths.appIndexJs,
  ],
  output: {
    pathinfo: true,
    filename: 'static/js/bundle.js',
    chunkFilename: 'static/js/[name].chunk.js',
    publicPath,
    devtoolModuleFilenameTemplate: (info) => path.resolve(info.absoluteResourcePath).replace(/\/g, '/'),
  },
  infrastructureLogging: {
    level: 'verbose', // Enable detailed logging
  },
  resolve: {
    modules: ['node_modules', path.resolve(__dirname, 'node_modules'), paths.appNodeModules].concat(
      process.env.N_PATH.split(path.delimiter).filter(Boolean),
    ),
    extensions: ['.web.js', '.mjs', '.js', '.json', '.web.jsx', '.jsx'],
    alias: {
      'react-native': 'react-native-web',
    },
    plugins: [
      new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson, babelRuntimeEntry,
        babelRuntimeEntryHelpers,
        babelRuntimeRegenerator]),
    ],
  },
  module: {
    strictExportPresence: true,
    rules: [
      {
        test: /.(js|jsx|mjs)$/,
        enforce: 'pre',
        use: [
          {
            options: {
              formatter: eslintFormatter,
              eslintPath: require.resolve('eslint'),

            },
            loader: require.resolve('eslint-loader'),
          },
        ],
        include: paths.appSrc,
      },
      {
        oneOf: [
          {
            test: [/.bmp$/, /.gif$/, /.jpe?g$/, /.png$/],
            loader: require.resolve('url-loader'),
            options: {
              limit: 10000,
              name: 'static/media/[name].[hash:8].[ext]',
            },
          },
          {
            test: /.(js|jsx|mjs)$/,
            include: paths.appSrc,
            loader: require.resolve('babel-loader'),
            options: {
              cacheDirectory: true,
            },
          },
          {
            test: /.less$/,
            use: [
              require.resolve('style-loader'),
              {
                loader: require.resolve('css-loader'),
                options: {
                  importLoaders: 1,
                },
              },
              {
                loader: require.resolve('postcss-loader'),
                options: {
                  // Necessary for external CSS imports to work
                  // https://github.com/facebookincubator/create-react-app/issues/2677
                  ident: 'postcss',
                  plugins: () => [
                    postcssFlexbugsFixes,
                    autoprefixer({
                      browsers: [
                        '>1%',
                        'last 4 versions',
                        'Firefox ESR',
                        'not ie < 9', // React doesn't support IE8 anyway
                      ],
                      flexbox: 'no-2009',
                    }),
                  ],
                },
              },
              require.resolve('less-loader'),
            ],
          },
          {
            test: /.css$/,
            use: [
              require.resolve('style-loader'),
              {
                loader: require.resolve('css-loader'),
                options: {
                  importLoaders: 1,
                },
              },
              {
                loader: require.resolve('postcss-loader'),
                options: {
                  ident: 'postcss',
                  plugins: () => [
                    postcssFlexbugsFixes,
                    autoprefixer({
                      browsers: [
                        '>1%',
                        'last 4 versions',
                        'Firefox ESR',
                        'not ie < 9', // React doesn't support IE8 anyway
                      ],
                      flexbox: 'no-2009',
                    }),
                  ],
                },
              },
            ],
          },
          {
            exclude: [/.(js|jsx|mjs)$/, /.html$/, /.json$/],
            loader: require.resolve('file-loader'),
            options: {
              name: 'static/media/[name].[hash:8].[ext]',
            },
          },
        ],
      },
    ],
  },
  plugins: [
    new InterpolateHtmlPlugin(HtmlWebpackPlugin, env.raw),
    new HtmlWebpackPlugin({
      inject: true,
      template: paths.appHtml,
      publicPath,
    }),
    new webpack.DefinePlugin(env.stringified),

    new CaseSensitivePathsPlugin(),
    new webpack.IgnorePlugin({
      resourceRegExp: /^./locale$/,
      contextRegExp: /moment$/,
    }),
  ],
  node: {
    __dirname: true, // Allow __dirname to be used as in Node.js
    __filename: true, // Allow __filename to be used as in Node.js
    global: true, // Allow global to be used as in Node.js
  },
  performance: {
    hints: false,
  },
};

webpackDevServerConfig.js

const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware');
const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware');
const ignoredFiles = require('react-dev-utils/ignoredFiles');
const config = require('./webpack.config.dev');
const paths = require('./paths');

const protocol = 'https';
const host = '0.0.0.0';

module.exports = function (proxy, allowedHost) {
  return {
    port: 3000,
    allowedHosts: 'all',
    compress: true,
    hot: true,
    devMiddleware: {
      publicPath: config.output.publicPath,
    },
    static: {
      directory: paths.appBuild,
      watch: {
        ignored: ignoredFiles(paths.appSrc),
      },
    },
    https: protocol === 'https',
    host,
    historyApiFallback: {
      disableDotRule: true,
    },
    client: {
      logging: 'info',
      overlay: {
        warnings: true,
        errors: true,
      },
      webSocketURL: {
        hostname: allowedHost,
      },
    },
    proxy,
    setupMiddlewares: (middlewares, devServer) => {
      devServer.app.use(errorOverlayMiddleware());
      devServer.app.use(noopServiceWorkerMiddleware());
      return middlewares;
    },
  };
};

public/index.html

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="theme-color" content="#000000">
  <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
  <link href='//fonts.googleapis.com/css?family=Lato:400,300,600' rel='stylesheet' type='text/css'>
  <link href="/web-fonts/2.6.0/webfonts-eg.min.css" rel="stylesheet" type="text/css">
  <title>app</title>
  <base href="/" />
</head>
<body>
  <noscript>
    You need to enable JavaScript to run this app.
  </noscript>
  <script>
    window.__PRELOADED_STATE__ = {{{ json runtime }}};
  </script>
  <div id="root" class="root"></div>
</body>
</html>

I could also see that in static/js/bundles.js when viewed from Sources tab, the content should be all the JS from the entry point and beyond but could see the html similar to that of index.html, may be that is what causing the “Unexpected token ‘<‘ (at bundle.js:1:1)” error.

My index.js already has frontend static path set

app.use('/static', express.static(path.join(__dirname, '../build/static'), { maxAge: '30d' })); 

Already tried these:

but there seems to be no way I can get this fixed 🙁 Absolutely no idea whats wrong here, any help is appreciated. Thanks in advance!

Excel spreadsheet to json API [closed]

I have a client that wants to update and add properties and property details including images via an excel spreadsheet. They are using WordPress as a CMS but I want to keep the property section separate. I’d like to access data via a jSON API and use some sort front-end framework/library such as React or Vue. What would be the simplest solution for accomplishing this task?

Expo React native Stack headerRight with custom component does not redirect using Link

I am starting with Expo and React Native. I want to redirect to a custom page using Stack in Expo and React native. The Link work in the first example, but in the headerRight does not. I check the stack documentation but it does not say about using redirect in the headerRight. But it does say that accepts React component. The Link works outside of Stack and I also have a menu in index.js where I have more links and all of them work just fine with the stack functionality.

Can you help me to understand why the headerRight button may not be working? Thank you for your help.

_layout.js

import { Stack, Link } from "expo-router";
import { View, Text, StyleSheet, Pressable } from "react-native";

export default function Layout() {
  return (
    <View className="flex-1 bg-black">
      <Link href="/about" asChild>  <-- Working
        <Pressable>
          <Text style={styles.buttonText}>About</Text>
        </Pressable>
      </Link>
      <Stack
        screenOptions={{
          headerStyle: {
            backgroundColor: "#888",
          },
          headerTintColor: "#fff",
          headerTitleStyle: {
            fontWeight: "bold",
          },
          headerRight: () => (
            <Link href="/about" asChild> <-- Does not work
              <Pressable>
                <Text style={styles.buttonText}>About</Text>
              </Pressable>
            </Link>
          ),
        }}
      >
        <Stack.Screen name="index" options={{ title: "Home" }} />
        <Stack.Screen name="about" options={{ title: "About" }} />
      </Stack>
    </View>
  );
}

about.js

import { ScrollView, Text } from "react-native";

export default function About() {
  return (
      <Text classname="text-white text-white/900" style={{ marginBottom: 40 }}>
        Lorem ipsum..
      </Text>     
  );
}

index.js

import { useCameraPermissions } from "expo-camera";
import { Link } from "expo-router";
import { useEffect, useState } from "react";
import { StyleSheet, Text } from "react-native";
import { View, TouchableOpacity } from "react-native";

export default function Index() {
  return (
       <View className=" bg-orange-300 items-center justify-center">          
          <Link href="/camera" asChild>
            <TouchableOpacity style={styles.button}>
              <Text style={styles.buttonText}>Escaner</Text>
            </TouchableOpacity>
          </Link>
      ...many other...
          <Link href="/about" style={styles.buttonText} asChild>
            <TouchableOpacity style={styles.button}>
              <Text style={styles.buttonText}>About</Text>
            </TouchableOpacity>
          </Link>
        </View> 
  );
}

package.json

{
  "name": "codebar-app",
  "version": "1.0.0",
  "main": "expo-router/entry",
  "scripts": {
    ...
  },
  "dependencies": {    
    "@react-native-async-storage/async-storage": "^2.1.2",
    "@react-native-picker/picker": "2.9.0",
    "expo": "~52.0.19",
    "expo-camera": "~16.0.10",
    "expo-constants": "~17.0.8",
    "expo-linking": "~7.0.5",
    "expo-router": "~4.0.19",
    "expo-status-bar": "~2.0.1",
    "nativewind": "^2.0.11",
    "react": "18.3.1",
    "react-native": "0.76.5",    
    "react-native-safe-area-context": "4.12.0",
    "react-native-screens": "~4.4.0",    
    "react-native-web": "~0.19.13"
  },

Content Stop taking width if use container-type: inline-size; with flex property on parent

I have used container-type: inline-size; css Property to apply diff css when its element width got changes Like :

`.alert-container {
    container-type: inline-size;
  }
  @container (width <=320px) {
    .alert {
      border-radius: $u-8 !important;
    }
    .wideActionButtons {
      display: none !important;
    }}`

But when its parent element use flex property then the component breaks. its showing 0 width but showing height
Breaking Alert
Since i can’t /don’t want to give this component fixed width.
so have applied diff css property property but nothing work.
I don’t want to remove container-type: inline-size; because i haven’t find alternative of this for adjust css of element and its child when its width or height change.

  • @media query is working on viewport dimensions.

How to stop event propagation on range input?

I’m coding a simple volumen slider using a range input but when the @input event fires on the range input it also fires a click event on the parent div, how can I avoid that from happening?

      <div
        @mouseenter="showVolumeControl"
        @mouseleave="hideVolumeControl"
        @click="muteVolume"
      >
        <input
          v-if="volumeControl"
          @input="changeVolume"
          v-model.number="volume"
          type="range"
          min="0"
          max="1"
          step="0.01"
          id="volume-slider"
        />
        <svg class="icon">
          <use v-if="volume > 0.5" xlink:href="#icon-volume-up"></use>
          <use v-else-if="volume === 0" xlink:href="#icon-mute"></use>
          <use v-else xlink:href="#icon-volume-down"></use>
        </svg>
      </div>