The warning is there just to let you know that when you're using hash history, you can't actually PUSH the same path; the browser won't add anything to the history stack.
But you should only get this warning in development. If you generate your production build correctly (using NODE_ENV=production) you shouldn't see this warning in production.
class Header extends React.Component {
constructor() {
super();
this.state = {
items: [
{ name: 'Google', link: 'https://google.com' },
{ name: 'Yandex', link: 'https://yandex.com' }
] };
}
render() {
const list = this.state.items.map((item, index) => {
return <li key={index}><a href={item.link}>{item.name}</a></li>;
});
return <ul>
{list}
</ul>;
}
}
$('form#f_job').submit(function(event){
event.preventDefault();
var formNm = $('#f_job')[0];
var formData = new FormData(formNm);
// отправляем данные
$.ajax({
url: "/mail.php",
type: "post",
data: formData,
contentType: false,
processData: false,
success: function(data){
console.log(data);
},
});
});
[HMR] Error: Expected the nextReducer to be a function.
at Object.replaceReducer (eval at <anonymous> (http://localhost:3000/static/bundle.js:1164:2), <anonymous>:204:13)
at eval (eval at <anonymous> (http://localhost:3000/static/bundle.js:1218:2), <anonymous>:25:19)
at Object.hotApply [as apply] (http://localhost:3000/static/bundle.js:496:16)
at cb (eval at <anonymous> (http://localhost:3000/static/bundle.js:1914:2), <anonymous>:52:36)
at hotUpdateDownloaded (http://localhost:3000/static/bundle.js:312:13)
at hotAddUpdateChunk (http://localhost:3000/static/bundle.js:284:13)
at webpackHotUpdateCallback (http://localhost:3000/static/bundle.js:5:12)
at http://localhost:3000/static/0.916eed0bd9ddd123d37f.hot-update.js:1:1
google.maps.event.addListener(marker, 'mouseover', onMarkermouseover);
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=ваш апи">
</script>
<script type="text/javascript">
google.maps.event.addDomListener(window, 'load', function() {
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 9,
center: new google.maps.LatLng(44.958196, 34.109555),
scrollwheel: false,
styles: [{"featureType":"administrative","elementType":"labels.text.fill","stylers":[{"color":"#444444"}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#f2f2f2"}]},{"featureType":"poi","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"all","stylers":[{"saturation":-100},{"lightness":45}]},{"featureType":"road.highway","elementType":"all","stylers":[{"visibility":"simplified"}]},{"featureType":"road.arterial","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"all","stylers":[{"color":"#46bcec"},{"visibility":"on"}]}],
mapTypeId: google.maps.MapTypeId.ROADMAP
});
var infoWindow = new google.maps.InfoWindow;
var onMarkerClick = function() {
var marker = this;
var latLng = marker.getPosition();
infoWindow.setContent(marker.title);
infoWindow.open(map, marker);
};
google.maps.event.addListener(map, 'click', function() {
infoWindow.close();
});
var onMarkermouseover = function() {
var marker = this;
var latLng = marker.getPosition();
infoWindow.setContent(marker.title);
infoWindow.open(map, marker);
};
google.maps.event.addListener(map, 'mouseover', function() {
infoWindow.close();
});
var marker1 = new google.maps.Marker({
map: map,
title: 'sadasdad',
icon: 'icon.png',
position: new google.maps.LatLng(44.958196,34.109555)
});
var marker2 = new google.maps.Marker({
map: map,
title: 'dfd',
icon: 'icon.png',
position: new google.maps.LatLng(44.858196,34.109555)
});
var marker3 = new google.maps.Marker({
map: map,
title: 'ааа',
icon: 'icon.png',
position: new google.maps.LatLng(44.758196,34.109555)
});
// infoWindow.open(map, marker1);
google.maps.event.addListener(marker1, 'mouseover', onMarkermouseover);
google.maps.event.addListener(map, 'mouseover', onMarkermouseover);
google.maps.event.addListener(marker2, 'mouseover', onMarkermouseover);
google.maps.event.addListener(marker3, 'mouseover', onMarkermouseover);
google.maps.event.addListener(marker1, 'click', onMarkerClick);
google.maps.event.addListener(marker2, 'click', onMarkerClick);
google.maps.event.addListener(marker3, 'click', onMarkerClick);
});
</script>
<?php
global $post;
$postslist = get_posts( array( 'posts_per_page' => 2, 'category'=>'news' ) );
foreach ( $postslist as $post ){
setup_postdata($post);
?>
<div>
<?php the_date(); ?> - выводит дату новости
<?php the_title(); ?> - выводит заголовок новости
<?php the_excerpt(); ?> - выводит краткое описание
<?php the_post_thumbnail(); ?> - выводит превью новости - картинку
</div>
<?php
}
wp_reset_postdata(); ?>
не копирует/оптимизирует не одно изображениеДело не в плагинах. Вероятно, это вы что-то делаете не так.