JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://openlayers.org/en/v3.2.1/css/ol.css">
<script src="http://openlayers.org/en/v3.2.1/build/ol.js"></script>
<div class="mapViewport">
    <div id="map" class="Map">
        
    </div>
</div>

CSS

.mapViewport {
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    position: fixed;
}

JavaScript

var map = new ol.Map({
    layers: [
    new ol.layer.Tile({
        source: new ol.source.OSM()
    })],
    renderer: 'canvas',
    target: 'map',
    view: new ol.View2D({
        center: [0, 0],
        zoom: 2
    })
});