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.

Update docs for using a different store key

See original GitHub issue
  • Mark createProvider as deprecated/removed.
  • Mark storeKey in connectAdvanced() as deprecated/removed.
  • It would also be nice to add a new section detailing how to accomplish it with the new API.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
markeriksoncommented, Dec 14, 2018

Yeah, we’re still working on updating the docs for v6 (and hopefully setting up versioned docs for v5 vs v6).

0reactions
ethanrodaycommented, Dec 14, 2018

I haven’t tried just yet, but I imagine it should be workable. I can create the context and pass it to the Provider at the app level, and then just call connect with the context option. (I’m basing this on the You may also pass a {context : MyContext} option to connect part of the error message.)

Does that sound right?


EDIT:

That’s working! I created a null context called LocalStoreContext and provided both stores at the app level:

 // index.ts
<Provider store={store}>
  <Provider store={localStore} context={LocalStoreContext}>
    <App />
  </Provider>
</Provider>

And I wrapped the connect() function like so (I was using storeKey before; now I’m using context):

// local-connect.ts
export const localConnect: Connect = (mapStateToProps?, mapDispatchToProps?, mergeProps?, options?) =>
connect(mapStateToProps, mapDispatchToProps, mergeProps, {...options, context: LocalStoreContext});

Then when I want to connect a component to the local store, I just do @localConnect( /* ... */ )(MyComponent) like I was already doing.

So, in the end, very little change needed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

update-custom-key-store — AWS CLI 1.27.28 Command ...
Identifies the custom key store that you want to update. Enter the ID of the custom key store. To find the ID of...
Read more >
Different store and key passwords not supported for PKCS12 ...
One workaround I found is to first create the keystore file with the same password in Android Studio then switch to an old...
Read more >
Use a security key for 2-Step Verification - Google Account Help
Security keys can be used with 2-Step Verification to help you keep hackers out of your Google Account. Important: If you're a journalist,...
Read more >
Entities, Properties, and Keys | Cloud Datastore Documentation
Updating an entity. To update an existing entity, modify the properties of the entity previously retrieved and store it using the key:.
Read more >
keytool-Key and Certificate Management Tool
In order to access the private key, the appropriate password must be provided, since private keys are protected in the keystore with a...
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 Hashnode Post

No results found