https://htmx.org logo
Join Discord
Powered by
# htmx-general
  • b

    broad-lifeguard-12969

    10/20/2022, 4:14 PM
    2. after writing something:
  • b

    broad-lifeguard-12969

    10/20/2022, 4:17 PM
    but I want my home page shows the list of jobs, how can I do that? I've been doing research I think I have to do a swap?
  • b

    broad-lifeguard-12969

    10/20/2022, 4:20 PM
    on my production environment I have something like this->
  • b

    broad-lifeguard-12969

    10/20/2022, 4:23 PM
    any feedback is very welcome 🙏
  • m

    mysterious-toddler-20573

    10/20/2022, 4:27 PM
    you would need to add a filter to the trigger and keep that state in a variable via javascript or similar
  • m

    mysterious-toddler-20573

    10/20/2022, 4:27 PM
    every 10s[noInteractionInLast10s]
  • m

    mysterious-toddler-20573

    10/20/2022, 4:28 PM
    this seems like a backend-specific question, can you ask in the appropriate channel?
  • p

    prehistoric-wolf-75047

    10/20/2022, 4:28 PM
    @mysterious-toddler-20573 Thanks. That's what I had in mind as well. Now I know that this is the way to go. Thank you
  • b

    broad-lifeguard-12969

    10/20/2022, 4:29 PM
    sure, I'll do it
  • p

    prehistoric-wolf-75047

    10/20/2022, 4:30 PM
    The documentation is a bit unclear about whether "Standard filters" apply to the
    every
    event as well, as it doesn't seem to be a standard event.
  • m

    mysterious-toddler-20573

    10/20/2022, 4:35 PM
    yes, I need to update the docs
  • m

    mysterious-toddler-20573

    10/20/2022, 4:35 PM
    OR BETTER YET
  • m

    mysterious-toddler-20573

    10/20/2022, 4:35 PM
    when you get it going, could you do a PR against them?
  • m

    mysterious-toddler-20573

    10/20/2022, 4:35 PM
    🙂
  • c

    colossal-controller-54041

    10/20/2022, 4:45 PM
    Hi, guys. Could somebody, please, give me a hint about what I'm doing wrong? I'm using Laravel mix for bundling my assets and was trying to expose htmx as a global variable. There is an example in the docs about it, but it doesn't work for some reason. index.js (simplified):
    Copy code
    import Alpine from 'alpinejs';
    import 'htmx.org';
    import './custom';
    
    window.Alpine = Alpine;
    Alpine.start();
    custom.js
    Copy code
    window.htmx = require('htmx.org');
    Errors that I'm getting
    Copy code
    ERROR in ./src/scripts/custom.js 1:0-11
    Module not found: Error: Can't resolve 'htmx' in 'D:\somefolder\src\scripts'
    
    ERROR in ./src/scripts/custom.js
    Cannot read property 'module' of undefined
    
    webpack compiled with 2 errors
  • b

    bitter-machine-55943

    10/20/2022, 5:18 PM
    How do you use HTMX here? (CDN, npm, copy file by hand, etc)?
  • c

    colossal-controller-54041

    10/20/2022, 5:19 PM
    NPM
  • h

    hundreds-camera-24900

    10/20/2022, 6:36 PM
    importing htmx sets the window variable
  • h

    hundreds-camera-24900

    10/20/2022, 6:37 PM
    so rather than trying to set it directly in custom.js, in index.js where you import htmx:
    const { htmx } = window;
  • h

    hundreds-camera-24900

    10/20/2022, 6:43 PM
    that said your error messages are about pathing, so I think it's probably the require call vs the import
  • m

    most-flag-2080

    10/20/2022, 10:26 PM
    Do any of you have experience with vue?
  • m

    most-flag-2080

    10/20/2022, 10:26 PM
    Curious how many experience you have with it before switching to htmx
  • m

    most-flag-2080

    10/20/2022, 10:26 PM
    It’s pretty easy to use
  • p

    proud-dentist-32878

    10/20/2022, 10:38 PM
    I've used vue and react and angular and backbonejs and would take htmx anyday. It's way less effort. It's really convenient to let the server handle state.
  • m

    most-flag-2080

    10/20/2022, 10:59 PM
    what if the data is on the client like interacting with certain apis
  • b

    bitter-machine-55943

    10/21/2022, 12:03 AM
    I used Vue. Got tired of it. “Easy to use” is relative. Like if I write something in Python, that’s easy, concise, and expressive. But in Vue there are times I just need to change a few variables and I’m having to change 6 files, “emit” this, “fetch” that, “use” this, “mutate” that…like, what the heck I just wanted to add a variable. The problem is, JavaScript before Vue was such a terrible ecosystem that Vue seems like it’s a big step forward. Which it is, but it’s still not some awesome experience compared to building in other languages.
  • b

    bitter-machine-55943

    10/21/2022, 12:07 AM
    If you need Vue/React/etc you should know why. Like, it should be clear how the simpler way will become unsustainable, and why moving to a more complex tool is unavoidable. Like if you manage one restaurant, you can drive there and check on it. But it’s clear that won’t work if you have 1000 restaurant locations. It’s clear as day you need a different approach, and the simpler approach is going to fail miserably. If I don’t have that level of clarity why I need React/etc then I’m going to stick with simpler tools.
  • m

    most-flag-2080

    10/21/2022, 1:02 AM
    Would you say an interactive shopping cart is an example of that?
  • b

    bitter-machine-55943

    10/21/2022, 3:10 AM
    Many ways to build a thing. Will be different for a solo dev selling a few e-books, vs a giant team building an enterprise shopping cart that talks to 30 other systems. Sorry, I’m a bit dramatic to try and get people to consider a different perspective 🙂 In general with systems, whether software or hardware (servers, storage, networking, etc) simpler is always more robust, easier to debug, easier to secure, and so on. But simple doesn’t always scale, so complexity is often unavoidable. Consider if the added complexity from the start is adding anything. Maybe it does, or maybe it helps get a better job. Many sides to consider.
  • w

    white-art-78549

    10/21/2022, 5:46 AM
    hey all, htmx put a bug in my mind about how websites are developed
1...864865866...1146Latest