Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@react_component directive not working? #28

Closed
nrcook opened this issue Jun 21, 2015 · 9 comments
Closed

@react_component directive not working? #28

nrcook opened this issue Jun 21, 2015 · 9 comments
Labels

Comments

@nrcook
Copy link

nrcook commented Jun 21, 2015

Laravel 5.1, React-laravel 0.9.1

Tried on a couple different Laravel apps, both 5.0.* and 5.1. Neither one seemed to render the @react_component directive. Is there a missing step for getting this up and running that's not in the Readme?

Thanks!

@lgt
Copy link

lgt commented Jun 22, 2015

+1

@talyssonoc
Copy link
Owner

Well, it should be working, sadly you're not the first to say this, I don't know yet what's happening. Can you try to use this example project (I should link to it at readme) https://github.com/talyssonoc/react-laravel-example ?

@nrcook
Copy link
Author

nrcook commented Jun 23, 2015

Just tried, no that example project is not working for me either. Running this on Homestead, though not sure why that would make a difference.

@nrcook
Copy link
Author

nrcook commented Jun 23, 2015

Just looked through some of the source, looks like you are using Facades now? I changed a line in the sample project to {!!React::render('Message', [ 'name' => 'Hue' ])!!} and it did work.

@talyssonoc
Copy link
Owner

@nrcook actually react-laravel always used facades, what @react_component directive did was call this facade, good to know that the facade work, the error must be in the registration of the directive...

@a-moses
Copy link

a-moses commented Jun 27, 2015

maybe we need to compile specific version of V8 lib not the last one and not to older one like 1.3

what is the working version stable of v8 lib working on ubuntu ?

@TomCaserta
Copy link
Contributor

Yeah right now you cannot have a deferred service provider and a blade directive as it doesnt know to load the service provider associated with the directive. Hopefully in future laravel versions it would be possible for that to work. For now, I personally have just set the deferred property to false to get it to work.

@talyssonoc
Copy link
Owner

Well, I didn't know that ! Gonna fix it later today (a PR would be good, too). Thanks, @TomCaserta !

@talyssonoc
Copy link
Owner

@TomCaserta @nrcook @lgt can you try this instructions here and say me if it does work? #41 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants