Closed damonmaria closed 5 years ago
Had to switch from using @computed
to mobx's decorate
due to jsdoc2md
not handling decorators. Meh.
@IjzerenHein Hey, just checking in on this. Are there any issues with this PR?
@damonmaria Hey. No not at all, just been pre-occupied with other things. Will check this out shortly, many thanks for the PR!
Looks really good @damonmaria 👍 . I've merged and release a new version: https://github.com/IjzerenHein/firestorter/releases/tag/v1.2.2
@IjzerenHein If you're happy with the use of decorate
to make properties computed
then I think it would be best if we went further and applied it to other properties. For example, Document.path
would be a good candidate as it does a lot of calculation. I'm sure there are others, and it shouldn't be a breaking change.
@damonmaria I guess that could be possible. Do you consider path
to be a property that is worthwhile of optmization? What is a practical use-case that would benefit from this optimisation?
I guess it's not much computation, it would avoid building the path
string on repeated uses of accessing the path
property. Same would apply to Collection
.
Done. Fought a bit with the tests but got it working.
Note: I've turned on
experimentalDecorators
intsconfig.json
to use@computed
onhasDocs
. I presume this is OK?A few tangental things:
firebaseConfig.json
). For example,Collection.add.test.js
are expecting an error to be thrown but the actual error is the permissions error, not what it's expecting. Can the security rules be fixed for that project?docs.length
changing (whilehasDocs
remained true) so madeseedSampleData.js
cleanup any new docs. Didn't need this in the end but have left it there.