Panel.Body is undefined when imported · Issue #3191 - GitHub

文章推薦指數: 80 %
投票人數:10人

The code sand box project is a create react app one. Using import Panel from 'react-bootstrap' Panel.Body is undefined. Skiptocontent {{message}} react-bootstrap / react-bootstrap Public Notifications Fork 3.3k Star 20.5k Code Issues 133 Pullrequests 30 Actions Projects 1 Wiki Security Insights More Code Issues Pullrequests Actions Projects Wiki Security Insights Newissue Haveaquestionaboutthisproject?SignupforafreeGitHubaccounttoopenanissueandcontactitsmaintainersandthecommunity. Pickausername EmailAddress Password SignupforGitHub Byclicking“SignupforGitHub”,youagreetoourtermsofserviceand privacystatement.We’lloccasionallysendyouaccountrelatedemails. AlreadyonGitHub? Signin toyouraccount Jumptobottom Panel.Bodyisundefinedwhenimported #3191 Closed rluitenopenedthisissue Jul6,2018 ·2comments Closed Panel.Bodyisundefinedwhenimported #3191 rluitenopenedthisissue Jul6,2018 ·2comments Comments Copylink Contributor rluiten commented Jul6,2018 Thecodesandboxprojectisacreatereactappone. UsingimportPanelfrom'react-bootstrap'Panel.Bodyisundefined. UsingimportPanelfrom'react-bootstrap/lib/Panel'Panel.Bodyisdefined. Using. "react":"16.4.1", "react-bootstrap":"0.32.1", "react-dom":"16.4.1", "react-scripts":"1.1.4" Examplehttps://codesandbox.io/s/7jzw1xyy66 Ididseeapreviousissuesforthis,butitwasclosedasbeingaversionproblem,thisisthelatestreact-bootstrap.Screenshotofcodesandbox,andthestacktraceattached. TypeError Cannotreadproperty'Body'ofundefined App /src/index.js:15:11 12|

13| 14|outside >15| |^ 16|body 17| 18| Viewcompiled ▶22stackframeswerecollapsed. evaluate /src/index.js:22:7 19|
20|); 21| >22|render(,document.getElementById('root')); |^ 23| Viewcompiled ▶10stackframeswerecollapsed. Thetextwasupdatedsuccessfully,buttheseerrorswereencountered: Copylink Member taion commented Jul6,2018 that'snottherightsyntaxforimporting importPanelfrom'react-bootstrap'; takesthedefaultexportfromreact-bootstrapandbindsittoPanel.youwanteither import{Panel}from'react-bootstrap'; importPanelfrom'react-bootstrap/lib/Panel'; Sorry,somethingwentwrong. taion closedthis Jul6,2018 Copylink BassamHajar commented Apr24,2019 Panel# removed,replacedwithCardcomponents 👍 1 👎 1 ❤️ 1 Sorry,somethingwentwrong. Signupforfree tojointhisconversationonGitHub. Alreadyhaveanaccount? Signintocomment Assignees Nooneassigned Labels Noneyet Projects Noneyet Milestone Nomilestone Linkedpullrequests Successfullymergingapullrequestmayclosethisissue. Noneyet 3participants Youcan’tperformthatactionatthistime. Yousignedinwithanothertaborwindow.Reloadtorefreshyoursession. Yousignedoutinanothertaborwindow.Reloadtorefreshyoursession.


請為這篇文章評分?