developit/unistore

React UMD bundle fails to execute

Open

#46 aberto em 18 de dez. de 2017

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)JavaScript (134 forks)github user discovery
bughelp wanted

Métricas do repositório

Stars
 (2.850 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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>

Guia do colaborador