We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ran into a usecase where I need to wrap a component before pushing the component onto the stack
The text was updated successfully, but these errors were encountered:
Let me reopen this, and elaborate a bit on the usecase.
The scenario I have is this, when using react-dnd, I need to sometimes wrap a child inside a decorator.
For example connectDragSource, this is what I have to do with just crel and pureComponent
T.crel -> connectDragSource(do T.pureComponent -> T.div T.div )
Not too bad, what i ended up doing is however this
T.use((teact)-> T.push = (contents)-> teact.stack?.push contents return contents T.build = (contents)-> previous = teact.resetStack null children = contents.apply teact, arguments teact.resetStack previous children ) T.push connectDragSource(T.build -> T.div T.div )
and I do believe that these two primitives are worthwhile considering to be included in the lib itself.
Sorry, something went wrong.
Thanks for writing this up @leiyangyou! I can see how those primitives would be useful. I'd wait for a little more demand before expanding the interface. You could publish your code as a separate mixin (similar to https://github.com/goodeggs/teacup-camel-to-kebab) and we'll revisit based on traction?
No branches or pull requests
ran into a usecase where I need to wrap a component before pushing the component onto the stack
The text was updated successfully, but these errors were encountered: