Skip to content

Instantly share code, notes, and snippets.

@reoxb
Last active October 29, 2020 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reoxb/ef727836b63c7f6e435e31465306935c to your computer and use it in GitHub Desktop.
Save reoxb/ef727836b63c7f6e435e31465306935c to your computer and use it in GitHub Desktop.
Javascript
export { default } from './fileToExport';
export { default as NewNameToCachOnCurlyBraces } from './fileToExport';
import { NewNameToCachOnCurlyBraces } from './fileToImport'
another way
export * from './module';
module index file
export * from './file1';
export * from './file2';
export * from './file3';
file1 content
export function setNavigation(navigation) {
return {
type: SET_NAVIGATION,
navigation
};
}
You can use it on this way.
import * as Actions from 'app/module';
Actions.setNavigation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment