You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For cases where a consumer only needs a few functions instead of the entirety of matrix, like in matrix-org/matrix-react-sdk#12871 - they shouldn't have to consume 1mb of JS to do simple things.
This may change the project more towards a library than an SDK though, and warrants team discussion.
The text was updated successfully, but these errors were encountered:
I think that smaller JS modules - that only export one thing - can be a good idea for some packages (the article cites lodash, and it's right). But lots (most?) of the js-sdk just isn't designed to work that way -- it's not like you can meaningfully import Room without importing MatrixClient, and MatrixClient depends on Room, so there's nothing to be gained by doing so. Worse, if every file becomes part of the public interface of the js-sdk, it becomes hard to maintain without breaking backwards compat every release, and hard to use because you can't find the right interface.
So sure, +1 to smaller public interfaces that don't import the entire world, but we need to continue to be clear which modules are public and which are internal, rather than going back to open season on them.
For cases where a consumer only needs a few functions instead of the entirety of
matrix
, like in matrix-org/matrix-react-sdk#12871 - they shouldn't have to consume 1mb of JS to do simple things.This may change the project more towards a library than an SDK though, and warrants team discussion.
The text was updated successfully, but these errors were encountered: