spring icon indicating copy to clipboard operation
spring copied to clipboard

Spring and jsx files

Open mockdeep opened this issue 10 years ago • 5 comments

I'm not sure if this is an issue with Spring or something else, but one annoyance I'm finding is that when I'm editing .jsx files, spring doesn't automatically reload them, so I have to reboot spring in order for changes to register.

mockdeep avatar Feb 08 '15 15:02 mockdeep

Same bug here. I've tried adding to my .spring.rb:

Spring.watch "app/assets/javascripts/components/*.js.jsx"

but it doesn't seem to do anything.

c-lliope avatar Apr 08 '15 03:04 c-lliope

hey, can you help me recreate this issue?

I have following in hello_world.js.jsx:

var HelloWorld = React.createClass({
  render: function(){
    return (<h1>Helloooooo World</h1>);
  }
});

My following tests is passing:

it 'checks for helloooooo text', js: true do
  visit '/hello'
  expect(page).to have_content "Helloooooo"
end

I changed hello_world.js.jsx to:

var HelloWorld = React.createClass({
  render: function(){
    return (<h1>Hey World</h1>);
  }
});

and now following test passes:

it 'checks for hey text', js: true do
  visit '/hello'
  expect(page).to have_content "Hey"
end

I am running my test with:

bin/rake spec SPEC=path/to/feature_spec.rb

sonalkr132 avatar Dec 10 '15 12:12 sonalkr132

Hmm, it's been a while since I looked into this, and I don't remember the exact situation when it was happening. I think it might have been when running the rails server, which spring doesn't handle, so if there is still a problem, maybe it's somewhere else. This can probably be closed, unless @graysonwright has a repro.

mockdeep avatar Dec 10 '15 16:12 mockdeep

Hey, can we close this now?

sonalkr132 avatar Dec 16 '15 04:12 sonalkr132

It's been a while and I don't have a good way to reproduce this, so I'm okay closing.

c-lliope avatar Mar 05 '16 19:03 c-lliope