question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

docs: Please add submodule usage example.

See original GitHub issue

Trying to expand on this example: https://codesandbox.io/s/github/danielroe/nuxt-typed-vuex-example?from-embed

I even made sure my local deps are exactly the same as those in the codesandbox.

While everything seems to work, this.$accessor.submodule seems to be undefined at runtime. And that’s because submodule is a property of this.$accessor.modules, not of this.$accessor.

Therefore, all the typing available @ this.$accessor is kind of useless, since it is cast at the wrong level.

Could you please update the example above with one method and one action in the submodule and a usage example in any component?

Thank you very much.

Your efforts are wildly appreciated (unrelated to this particular, petty request). Stay safe.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
andrei-gheorghiucommented, Apr 21, 2020

I don’t remember what I was using. I was prototyping like mad, trying to decide on whether to use Nuxt or not (a bit overkill for that project), among other choices. Sandbox suggests I was in one of the Nuxt prototypes.

I’m excited to hear it works, I’ll give it another go, first chance I get. Could the issue have been related to the typescript version used (under the hood)? More of a rhetorical question, really.

I’ll close this, since it obviously works as intended now.

Cheers!

1reaction
michaelmarconicommented, Apr 1, 2020

Hi @danielroe — I’m using Nuxt.

I forked your code sandbox and tried the accessor on a submodule and it works perfectly. See: https://codesandbox.io/s/hopeful-lamport-60srs

I restarted VS code on my side and it all started working, so something wasn’t registering a config file I suspect!

Read more comments on GitHub >

github_iconTop Results From Across the Web

git-submodule Documentation - Git
Branch of repository to add as submodule. The name of the branch is recorded as submodule.<name>.branch in .gitmodules for update --remote . A ......
Read more >
Git Submodules: Adding, Using, Removing, Updating
In order, you will need to know how to add, make use of, remove, and update submodules. I'll cover each of those uses...
Read more >
How To Add and Update Git Submodules - devconnected
The first thing you want to do is to add a Git submodule to your main project. In order to add a Git...
Read more >
Git Submodules: How to Use Them and Why - Sweetcode.io
How do you use a Git submodule? First, let's create one under a repository called House. Let's say we want to add a...
Read more >
Using Git submodules with GitLab CI/CD
When you use Git submodules, your project should have a file named .gitmodules . You might need to modify it to work in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found