You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Basic structure of a react SDK and start of an implementation.
This commit is contained in:
15
src/MatrixClientPeg.js
Normal file
15
src/MatrixClientPeg.js
Normal file
@@ -0,0 +1,15 @@
|
||||
// A thing that holds your Matrix Client
|
||||
var Matrix = require("matrix-js-sdk");
|
||||
|
||||
var matrixClient = null;
|
||||
|
||||
module.exports = {
|
||||
get: function() {
|
||||
return matrixClient;
|
||||
},
|
||||
|
||||
replaceUsingUrl: function(hs_url) {
|
||||
matrixClient = Matrix.createClient(hs_url);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user