Replies: 2 comments 2 replies
-
Regarding Links to all reference docs were removed from xmtp.org. We'll bring them back! <3 |
Beta Was this translation helpful? Give feedback.
-
Related to Missing code samplesIn some cases, the samples just need to be created. But in other cases, the sample may not be applicable or the feature may not have been implemented for the SDK yet. “Code sample coming soon”No code sample - not sure if needed, not applicable, or not implemented yet? React
Kotlin
Swift
Dart
RN
“Not applicable”No code sample because feature does not apply to the SDK - correct? JS
React
“X… haven’t been implemented yet”No code sample because content type hasn’t been implemented for SDK yet - correct? Dart
RN
|
Beta Was this translation helpful? Give feedback.
-
XMTP just wrapped another ETHGlobal Hackathon, with 27 teams using XMTP in their submissions. You can read more about these amazing apps here.
Every hackathon is a stress test for our SDKs and developer documentation. We need to take developers from having never used XMTP to launching a novel application on our protocol in a matter of hours.
The majority of the feedback for our docs and developer experience was positive. "Everything just worked". "So easy to use". "Your docs are amazing". While that feedback feels nice, it's not very actionable. In this post I want to focus on the times we fell short and hindered developer's success instead of accelerating it.
xmtp-js
issuesViem/Wagmi
By far the most common support request at our booth was around Viem and Wagmi. Today Viem/Wagmi is the most popular set of tools for developers to connect to wallets from the browser, but
xmtp-js
only acceptsethers.Signer
interface compatible objects in ourClient.create
method.Our FAQ includes some code snippets on how to adapt Viem/Wagmi to work with
xmtp-js
. They are copied directly from Lenster's open source implementation, and include references to private Lenster functions that won't work when copied into your app. They also include footguns that will cause the application to crash if the value returned from the hook is used before wallet connection (the use ofsignature ?? null
insignMessage
is not a good idea for most applications).The lack of Viem support has been a known issue for some time and has not been addressed.
Polyfill confusion
Many developers wondered why they had to include a polyfill for Buffer in their application and asked if we could just include the polyfill on their behalf.
RegisterCodecs confusion
In our documentation around custom content types we frequently use
client.registerCodec
instead of passing the codecs in during Client instantiation. With v11, we lose the benefits of typed clients with this method, and we should update all our docs to use thecodecs
property when creating the Client.@xmtp/react-sdk
issuesHard to find documentation
A lot of developers came to our booth asking for more examples of how to use the React SDK. Many of them hadn't seen either
xmtp-quickstart-hooks
or our React Quickstart example, which are both helpful resources for hackers.A number of developers complained that they found the documentation for the React Hooks sparse. We don't publish the Typedocs for the React hooks, so developers have to either copy/paste examples or wade into the source code to understand the full functionality of the package. Given we already create Typedocs in Github actions, I think it's just a question of publishing them somewhere more accessible and maybe adding more notes around intended usage.
Confusion with local first cache
Some developers were following our Local First Cache tutorial when ideally they would just be using our React hooks, which are much easier to work with. We do include a reference to the React hooks in the tutorial, but we aren't being particularly aggressive about routing developers to the React SDK
Out of date documentation
The Getting Started documentation for React contains a bug. The return type for
startConversation
has changed and it now returns an object instead of a conversation, which makes it difficult to use withuseStreamMessages
below.React Playground issues
The React Playground had a bug that would cause it to fail when reading messages. We should have at least a baseline level of testing for the playground to ensure that bad changes are caught before getting merged
iOS issues
WalletConnect V2
The biggest blocker for devs using
xmtp-ios
is the lack of a solid example using WalletConnect V2. Given that v1 has been retired, there is no end-to-end working example app for iOS right nowGeneral issues
There were a few more general things I noticed when working with developers across many different projects
xmtp-js
v11 and some are on v9 or v10. This causes confusion and bugs for developers trying to merge together multiple examples.Action items
xmtp-web
repo to take advantage of its well designed lint/tsconfig settings and release process.bot-starter
into thebot-kit-pro
monorepo. We might want to rename the repo toxmtp-node-js
or something more broad. It already includes some functions not directly in the scope of bot-kit-pro.xmtp-ios
xmtp-js
xmtp-js
when neededxmtp-js
lands we will need to update our documentation to remove references to the Lenster wrapper and instead show users how to pass in a Viem WalletClientBeta Was this translation helpful? Give feedback.
All reactions