Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Add CodeSandbox examples for basic use cases #86

Closed
bpas247 opened this issue Jun 3, 2019 · 4 comments
Closed

Add CodeSandbox examples for basic use cases #86

bpas247 opened this issue Jun 3, 2019 · 4 comments
Labels
documentation The documentation should be improved. help wanted The owner cannot resolve this on their own.

Comments

@bpas247
Copy link

bpas247 commented Jun 3, 2019

CodeSandbox provides a way to deploy example project setups. Due to the way you can import specific paths for GitHub repositories, we should consider adding examples to a new subdirectory in this repository for these examples, as it will allow users to be able to bootstrap their ReactN projects.

@quisido quisido added this to the 2.1.1 milestone Jun 4, 2019
@quisido quisido added documentation The documentation should be improved. help wanted The owner cannot resolve this on their own. labels Jun 4, 2019
@quisido
Copy link
Collaborator

quisido commented Jun 4, 2019

I support this idea. But given I don't have a lot of experience with CodeSandbox, I'll probably prioritize finishing the documentation over this. I do welcome user-submitted CodeSandbox examples, though, and I'll leave this as a milestone for after the documentation is completed.

@quisido quisido modified the milestones: 2.1.1, 2.1.2, 2.1.3 Jun 4, 2019
@quisido quisido added this to the 2.1.5 milestone Jun 30, 2019
@quisido quisido modified the milestones: 2.1.5, 2.1.6 Jul 21, 2019
@quisido quisido modified the milestones: 2.1.6, 2.1.8 Aug 8, 2019
@pikilon
Copy link

pikilon commented Aug 21, 2019

I am trying to do examples but I get null from global state

image

I can't tell if is the codesandbox or the reactn

https://codesandbox.io/embed/testing-reactn-hooks-lc0ci

@quisido
Copy link
Collaborator

quisido commented Aug 22, 2019

Thanks for your contributions!

It looks to me like it should be const [cards] = useGlobal('cards');

As is, you are returning the entire global state object instead of the array of cards.

@pikilon
Copy link

pikilon commented Aug 22, 2019

can you access nested state with this pattern or simillar?
const [id] = useGlobal('users.id');

I founded here, sorry
#4 (comment)

@quisido quisido closed this as completed Nov 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation The documentation should be improved. help wanted The owner cannot resolve this on their own.
Projects
None yet
Development

No branches or pull requests

3 participants