错误反应覆盖(警告:validateDOMNesting(...):<a> cannot appear as a descendant of </a> <a>)

时间:2019-05-20 13:41:14

标签: javascript reactjs web-applications react-dom

While im building react route for my react app The Warning in Console show up

in a (at home.js:246)
in div (at home.js:245)
in div (at home.js:244)
in article (created by ReactiveList)
in a (created by Styled(a))
in Styled(a) (created by ReactiveList)
in div (created by ReactiveList)
in div (created by ReactiveList)
in ReactiveList (created by Connect(ReactiveList))
in Connect(ReactiveList) (created by ResultCard)
in ResultCard (at home.js:206)
in div (at home.js:192)
in div (at home.js:93)
in div (created by Styled(div))
in Styled(div) (created by URLParamsProvider)
in URLParamsProvider (created by Connect(URLParamsProvider))
in Connect(URLParamsProvider) (created by ReactiveBase)
in Provider (created by ReactiveBase)
in ThemeProvider (created by ReactiveBase)
in ReactiveBase (at home.js:36)
in div (at home.js:33)
in home (created by Context.Consumer)
in Route (at src/index.js:41)
in Switch (at src/index.js:40)
in div (at src/index.js:37)
in Root (created by Connect(Root))
in Connect(Root) (created by Context.Consumer)
in Route (created by withRouter(Connect(Root)))
in withRouter(Connect(Root)) (at src/index.js:68)
in Router (created by BrowserRouter)
in BrowserRouter (at src/index.js:67)
in Provider (at src/index.js:66)

Im already searching for the solution in another post, but still not fix the problem

Below is the error for

in a (at home.js:246)
in div (at home.js:245)
in div (at home.js:244)
                        <div className="ih-item square effect6 top_to_bottom">
                          <a
                            target="homepage.keyword"
                            href={res.homepage}
                          >
                            <div className="img">
                              <img
                                src={
                                  res.img_source
                                }
                                alt={res.img_source}
                                className="result-image"
                              />
                            </div>
                            <div className="result-title">
                              {res.original_title}
                            </div>
                          </a>
                        </div>
                      </div>

How can i clear the Warning? Your help is appreciated so much, thanks

0 个答案:

没有答案