Answer the question
In order to leave comments, you need to log in
How to connect API yandex map and react?
I found the react-yandex-maps library, but honestly I don’t understand how to use it. It is clear that you can insert components on the map, but how to use the Yandex api methods, what options to prescribe to the components is not very clear.
For example, how to link this code from Yandex examples with React?
<input type="text" id="suggest"/>
<script src="//api-maps.yandex.ru/2.1/?lang=ru_RU&load=SuggestView&onload=onLoad"></script>
<script>
function onLoad (ymaps) {
var suggestView = new ymaps.SuggestView('suggest', {results: 1, offset: [20, 30]});
}
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question