-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix(docz-theme-default): rename playground container to avoid conflicts #429
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice changes! Thoughts on further namespacing that variable? While it is unlikely I could potentially see someone naming something with a single leading underscore.
@@ -388,13 +388,13 @@ export class Render extends Component<RenderComponentProps, RenderState> { | |||
|
|||
private transformCode(code: string): string { | |||
return ` | |||
const App = ({ children }) => ( | |||
const _App = ({ children }) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const _App = ({ children }) => ( | |
const _Docz_App = ({ children }) => ( |
What does everyone think about namespacing this so that it is even less likely to collide in the future? Since the user shouldn't need to interact with this directly I can't think of too many negatives to doing this.
<React.Fragment> | ||
{children && typeof children === 'function' ? children() : children} | ||
</React.Fragment> | ||
) | ||
|
||
render(<App>${code}</App>) | ||
render(<_App>${code}</_App>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
render(<_App>${code}</_App>) | |
render(<_Docz_App>${code}</_Docz_App>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that use underscore is something weird, I prefer DoczApp
like normal!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pedronauck I renamed it do DoczApp
Closes #426 |
Description
Solves issue: #426
I renamed playground container to avoid conflicts with components named
App
.