Understanding React.js import statment that imports modules from directory
我只是经历了" react-beautiful-dnd",并遇到了一个示例板拖放操作,可以在这里看到其工作原理。当我在此处检查源代码时。
在文件的开头,可以看到以下导入语句:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | // @flow import React, { Component } from 'react'; import styled, { injectGlobal } from 'styled-components'; import { action } from '@storybook/addon-actions'; import Column from './column'; import { colors } from '../constants'; import reorder, { reorderQuoteMap } from '../reorder'; import { DragDropContext, Droppable } from '../../../src'; import type { DropResult, DragStart, DraggableLocation, DroppableProvided, } from '../../../src'; import type { QuoteMap } from '../types'; |
我不太了解
如果在导入路径中插入目录,则默认为