Content
@
https://warpcast.com/~/channel/fc-devs
0 reply
0 recast
0 reaction
Daniel - Bountycaster
@pirosb3
š£ We are building a simpler way to detect Mini App environment We are considering different ways for Web apps to detect if they're running in Farcaster Mini App context vs. a regular web browser. Which approach would you prefer as a developer? Join the discussion: https://github.com/farcasterxyz/miniapps/discussions/222
9 replies
5 recasts
33 reactions
Poom
@poomchaio
I think both Option 1 and Option 3 would work for me. That said, I prefer Option 3 because it doesn't require manually appending query parameters every time Next.js navigates to a new route. This would make the experience more seamless from a developer perspective.
1 reply
0 recast
0 reaction
Gabriel Ayuso
@gabrielayuso.eth
You can set a specific homeUrl for a mini app on the manifest and embed configs. Could that be enough?
1 reply
0 recast
0 reaction
Poom
@poomchaio
Let us assume that homeURL is set to frame.com, and you need to detect the presence of "frame" in both / and /user. In Option 1, if the user opens the frame URL (i.e., frame.com?_fcMiniApp=true) and then navigates to /user using Next.js's router.push("/user"), the application will navigate to frame.com/user without preserving the query parameterāunless it is added manually. Although I am not opposed to Option 1, I believe Option 3 may be more suitable, as it eliminates the need to explicitly handle query parameters during navigation.
0 reply
0 recast
0 reaction