30th Jul 2020, 12:29 PM
Sarthak Chowdhry
Sarthak Chowdhry - avatar
2 Answers
0
Sarthak Chowdhry Your code not working on Code Playground, not because of export default. Do not set export default on single file react or code playground. You also have error on using props variable, it should be {props.var}, not {var}. You can only use {var} if you have destructured the variables from function argument, eg. function Tweet2({name, tweet, time}) .. Check out the working version here. https://code.sololearn.com/WaG1OTN0xqDR/?ref=app
30th Jul 2020, 3:05 PM
CalviŐČ
CalviŐČ - avatar
+ 2
*you have a typo in : export defult (default)
30th Jul 2020, 1:21 PM
Bahha┣
Bahha┣ - avatar