You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Contruct + Call Signature for Child React Components in TypeScript JSX #843
Can someone give a real world gist or example for how to legitimately link up a child component using a similar stack to what is provided in the ReactReduxSpa JavaScript Services Sample?
I am currently hitting errors of not having a construct or call signature no matter how I go about it.
Addressing those errors in some hacky ways, I am then hitting errors when exporting and nowhere does it [in the documentation] display a simple example of the proper usage of 'export default' or otherwise to truly export the child component for use with a parent.
Embarrassingly simple syntax issues. I should have been paying more attention to higher level component structures supplied in the project. Word to the wise though if coming from regular ES6 JS like I am, and definitely a novice with TypeScript...
Child components (classes) should be given the 'export' keyword straight away on the class instantiation. I guess thru all the spots I was reading I never caught on to this being the approach.
The following runs fine as a child to the map function.. (with different & appropriate props provided down obviously)
Map function:
Child component
Hopefully this helps someone else in the future. Not all of us are crushing it yet with this stack, to me this can fight against the next JS TS dotnetcore React/Redux novice's syntax error.
Activity
jmfury commentedon Apr 5, 2017
Embarrassingly simple syntax issues. I should have been paying more attention to higher level component structures supplied in the project. Word to the wise though if coming from regular ES6 JS like I am, and definitely a novice with TypeScript...
Child components (classes) should be given the 'export' keyword straight away on the class instantiation. I guess thru all the spots I was reading I never caught on to this being the approach.
The following runs fine as a child to the map function.. (with different & appropriate props provided down obviously)
Map function:

Child component

Hopefully this helps someone else in the future. Not all of us are crushing it yet with this stack, to me this can fight against the next JS TS dotnetcore React/Redux novice's syntax error.