How to setup sublime 3 with react native? it say add "add something like
REACT_EDITOR=atom to your .bashrc".
Where can add or edit REACT_EDITOR?
PRO TIP
When you see Red Box with stack trace, you can click any stack frame to jump to the source file. The packager will launch your editor of choice. It will first look at REACT_EDITOR environment variable, then at EDITOR. To set it up, you can add something like REACT_EDITOR=atom to your .bashrc.
How to setup sublime 3 with react native? it say add "add something like
REACT_EDITOR=atom to your .bashrc".
Where can add or edit REACT_EDITOR?
Share Improve this question edited Jun 20, 2020 at 9:12 CommunityBot 11 silver badge asked Sep 27, 2015 at 9:39 phongyewtongphongyewtong 5,31915 gold badges59 silver badges87 bronze badgesPRO TIP
When you see Red Box with stack trace, you can click any stack frame to jump to the source file. The packager will launch your editor of choice. It will first look at REACT_EDITOR environment variable, then at EDITOR. To set it up, you can add something like REACT_EDITOR=atom to your .bashrc.
2 Answers
Reset to default 4I got the same idea as you think of. You can do following:
1.We should make sure that sublime can be used in terminal mand. So firstly we make the sublime terminal mand.
sudo rm -rf /usr/local/bin/subl
sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin
then we run subl sublime.txt
you will find it works.
- We should change the
.bashrc
or.zshrc
(if you has installed the oh my zsh) by adding
export REACT_EDITOR=subl
3.We restart the terminal and run react native project then click the error message. Amazing things will happen : ) have fun!
Assuming you are using oh-my-zsh and have already created a symbolic link from subl
to sublime
and have vim
installed:
> vim ~/.zshrc
add:
export REACT_EDITOR=sublime
reload .zshrc:
> source ~/.zshrc
restart app: (example for iOS)
> react-native run-ios