Comments (8)
Thanks for raising this here @norunners - as I mentioned in the Slack channel, I will take a look when I get a minute and revert back.
from react.
Sounds good, I cut this issue for transparency in case other folks encounter the same issue.
from react.
This appears to be a GopherJS compiler issue... because after a cursory glance it doesn't even start running main
...
from react.
@norunners this is actually related to gopherjs/gopherjs#414
For the two branches where you see things "failing" the code does not actually compile because of an import cycle. If you run go build
in your main
package you'll see something like:
import cycle not allowed
package github.com/norunners/helloreact
imports github.com/norunners/helloreact/app
imports github.com/norunners/helloreact/nav
imports github.com/norunners/helloreact/app
gopherjs serve
doesn't report the problem; like gopherjs build
it should (but doesn't because of the linked issue).
Also, as far as updating components in different packages is concerned, I don't think there's any issues there, no least because the examples showcase does this repeatedly.
So I'd be tempted to close this issue... but will wait to hear back from you first.
from react.
Thank you for investigating this, if this is the case we can put an extra gotcha in the docs about circular dependencies.
Tonight, I'll do a quick proof of concept of putting the callback behavior interface in a third "share" Go package to verify that is the root cause.
from react.
Thank you for investigating this, if this is the case we can put an extra gotcha in the docs about circular dependencies.
No problem.
Sorry if I wasn't clear in my previous message. It's not a gotcha (with the React bindings); it's a bug in GopherJS that the circular dependency isn't reported to you as an error in your code.
from react.
Works as expected! As you mentioned in the related issue, this is something gopherjs serve should surface as an error. Feel free to close this issue.
from react.
Great. Closing this issue therefore
from react.
Related Issues (20)
- More CSS Types/Styles HOT 4
- Feature Request HOT 1
- Define aria-* attributes HOT 1
- Make go modules-compatible and switch to mono-repo HOT 18
- reactGen produces illegal code if element name starts with `v` HOT 1
- react.go line 71 conflicts with naming on HTML5 element `<s>` HOT 2
- Unable to use Props and States with maps and slices HOT 3
- How to write tests? HOT 3
- jsx.HTML silently fails to render valid input HOT 2
- Issue serving the HelloWorld page built by ReactGen (Windows 8.1 Command Prompt) HOT 3
- can not use input type="text" HOT 1
- Any suggestion import external react component?
- Form OnSubmit not mapped in FormProps
- ReactGen crash when judge HasEquals HOT 1
- StateGen store date conflict HOT 4
- State changes
- go get not working HOT 5
- Feature Suggestion: reactGen -init materializecss
- chrome react extension HOT 1
- how to import packages from npm
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react.