如何更改 ReactJS 项目(文件夹)名称,只需将文件夹名称从routing(文件夹)重命名为 react-routing-example(文件夹)。
我在这个堆栈溢出中发现了很少的重命名问题,但它们与 React-native 而不是 Reactjs 相关。
编辑 1:在创建 reactjs 应用程序时..我遵循以下命令:
npm create-react-app router
这router是我的文件夹名称。现在我想将该名称更改为react-router-example
提前致谢。
当我在 ReactJS 中使用 Google 地图时,我发现了两个不同的 npm,例如 google-map-react和google-maps-react。由于我是反应初学者,我有点困惑该使用什么(更喜欢)。虽然我找到了这个链接,但它有点不同,它是关于- google-map-react和react-google-maps之间的差异
import React, { Component } from 'react';
import GoogleMapReact from 'google-map-react';
const AnyReactComponent = ({ text }) => <div>{text}</div>;
class SimpleMap extends Component {
static defaultProps = {
center: {
lat: 59.95,
lng: 30.33
},
zoom: 11
};
render() {
return (
// Important! Always set the container height explicitly
<div style={{ height: '100vh', width: '100%' }}>
<GoogleMapReact
bootstrapURLKeys={{ key: /* YOUR …Run Code Online (Sandbox Code Playgroud) 在其他浏览器(opera,chrome)中,可折叠(隐藏和显示数据)工作正常。但是,进入IE onclick(如图所示,在公司)数据正在显示(展开),单击同一标签/按钮(公司)的数据没有隐藏。在控制台错误显示为Object.keys: argument is not an Object
我在这里发现相关问题Object.keys在Internet Explorer中不起作用, 但不适用于我的代码(对我没有帮助)。请帮我解决这个问题?
提前致谢。