Home>Article>Web Front-end> How to quote images in react

How to quote images in react

coldplay.xixi
coldplay.xixi Original
2020-11-19 17:59:35 4057browse

How to reference images in react: First open the code editor; then use the require method to introduce it, the code is [4c5da289ed57bea805bfe57d947bd77ea376092e9406724d5c271fcc648ed25a].

How to quote images in react

How to reference images in react:

The usual method is

but in This will report an error in React

The correct method should be

Use the require method

Related learning recommendations:javascript learning tutorial

The above is the detailed content of How to quote images in react. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn