Skip to content
This repository has been archived by the owner on Jan 2, 2018. It is now read-only.

Is it possible to enhance the store? #21

Closed
wadim opened this issue Jul 1, 2016 · 4 comments · Fixed by #56
Closed

Is it possible to enhance the store? #21

wadim opened this issue Jul 1, 2016 · 4 comments · Fixed by #56

Comments

@wadim
Copy link
Contributor

wadim commented Jul 1, 2016

Hi Gustav and Andreas!

I was wondering if you could help me figure this out:

My goal is to save parts of the store in localStorage, specifically information about the user.

To achieve this I wanted to use a store enhancer like the one here: https://github.com/elgerlambert/redux-localstorage

But looking through the code of the roc-package-web-app-react package, I cannot find a place where I could apply the store enhancer. The store is created within the package itself and the method that creates it does not seem to allow passing in store enhancers.

Am i missing something? Is it possible to enhance the store (assuming I am using the roc-package-web-app-react package)?

Do you perhaps have any other advice on how I could achieve my goal?

Will be grateful for some feedback on this.

@dlmr
Copy link
Member

dlmr commented Jul 1, 2016

Hello!

You are correct in that it's not possible today to add additional store enhancer and this is something we really would like to support. With that said I think we unfortunatly are a bit off until we will be able to support this, but PRs are very welcome!

In the mean time, if not a PR solves this, you can take over ownership over the store and implement it in your own project. You would basically then copy the create-store.js along with the default code. By then setting the client and the server entry point manually you will be able to build your application.

Do you think one of these approaches will work for you?

@wadim
Copy link
Contributor Author

wadim commented Jul 1, 2016

Thanks for the quick and accurate response Gustav!

I will try to go with option 2 for now.

@aeldaly
Copy link

aeldaly commented Dec 1, 2016

#21 (comment)

@dlmr Could you provide new links as those ones don't seem to work anymore. Also, is this still the recommended method?

@wadim Wondering if you got it working?

Thanks,
Ahmed

@dlmr
Copy link
Member

dlmr commented Dec 2, 2016

@aeldaly I have now updated the links in the comment so they work now. And yes, this is still the recommended method since we have yet decided on a general pattern to do this. 🙂

I happy to help if there is any problems or if something is unclear.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants