developit/unistore

React UMD bundle fails to execute

Open

#46 aperta il 18 dic 2017

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)JavaScript (134 fork)github user discovery
bughelp wanted

Metriche repository

Star
 (2850 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

I tried to use the UMD React build from unpkg, but it failed with Uncaught TypeError: Cannot read property 'Component' of undefined. I think it's because it expects to find React on the global object under name react but it's actually React (with a capital R). You can reproduce the issue by opening an html file like this in the browser:

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
	<script src="https://unpkg.com/unistore/full/react.umd.js"></script>
</head>
<body>
</body>
</html>

Guida contributor