The apple ones work great (essentially they are a jar with a funnel for the lid) if you don’t put so much liquid in them that it rises above the bottom of the funnel...and they work best when you don’t bother with putting their stuff in them but just fruit juice, or water with either some raspberry vinegar in it or else a tiny sliver of apple or peach in it.
Most of the time people fill them up too far and the gnats cannot even get in them to be trapped. Or, the liquid dries up because they fail to refill it every couple days.
A jar and funnel is better and cheaper than the cute little apple, doesn’t dry up as fast, and is easier to clean, which you have to do regularly because otherwise the drowned gnats get gross and can even stink. And, because gnats that are trapped or on the outside surface waiting to get in will still have sex and lay eggs on the trap, and if you don’t clean the trap or jar they hatch and the little larvae can crawl right out and pupate under a vase or other hidden location.
I have a big huntsman spider that lives in the banana bowl so don’t see gnats or anything else much at all when it is around.