developit/unistore

React UMD bundle fails to execute

Open

#46 opened on Dec 18, 2017

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

Repository metrics

Stars
 (2,850 stars)
PR merge metrics
 (No merged PRs in 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>

Contributor guide