Forward arguments in the constructor
See original GitHub issueGrommet does not work with react-apollo’s server-side rendering because of apollostack/react-apollo#132
Expected Behavior
Grommet should forward props and context to React.Component in the constructor.
constructor(props, context) {
super(props, context);
this._onResize = this._onResize.bind(this);
}
Actual Behavior
No arguments are forwarded.
constructor() {
super();
this._onResize = this._onResize.bind(this);
}
Your Environment
- Grommet version: 0.6.10
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
c++ - Is there a generic way to forward constructor arguments?
Suppose Animal's constructor is modified to Animal( std::string const& name ) , which needs the name to be passed up from the children...
Read more >Constructor Forwarding - develop - Boost C++ Libraries
Fortunately, most constructors take arguments by value, by const-reference or by rvalue reference. If these limitations are accepted, the forwarding ...
Read more >std::forward - cppreference.com
This example demonstrates perfect forwarding of the parameter(s) to the argument of the constructor of class T . Also, perfect forwarding of parameter...
Read more >Beware of Perfect Forwarding Constructors - Michael Park
So let's provide a move constructor as well as a templated constructor which perfectly forwards an argument to initialize our wrapped value.
Read more >Perfect forwarding arguments in a constructor of a templated ...
All std::forward does is simply forward whatever it gets directly to the consumer, if you pass lvalue, a lvalue will be forwarded, if...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Components with no constructor don’t need to forward params
@alansouzati You’re welcome.
Components with no constructor are fine from what I’ve seen.