Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: using constants for basePath #50

Open
Guria opened this issue Mar 7, 2016 · 5 comments
Open

docs: using constants for basePath #50

Guria opened this issue Mar 7, 2016 · 5 comments

Comments

@Guria
Copy link
Collaborator

Guria commented Mar 7, 2016

follow up from #15

@saulshanabrook
Copy link

saulshanabrook commented Jul 2, 2016

@Guria Is this something we should add to the README on this project? I am happy to do it, just wanna make sure I understand where you are coming from.

Would it be like

// statePaths.js
export const userPath = 'someModule.users'

// MyStatelessComponent.js
import {Component} from 'cerebral-view-react'
import {userPath} from '../statePaths'

const MyStatelessComponent = Component((props) => ({
  user: `{userPath}.{props.userID}`
})), (props) => (
  <h1>{props.user}</h1>;
));

@Guria
Copy link
Collaborator Author

Guria commented Jul 18, 2016

@christianalfoni how about add it to "How do I handle section?"

@saulshanabrook
Copy link

On this README or on the website?

@Guria
Copy link
Collaborator Author

Guria commented Jul 19, 2016

on website

@Guria
Copy link
Collaborator Author

Guria commented Jul 19, 2016

it's not tied to only react view

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

No branches or pull requests

2 participants