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

Connector Ref Updates #1278

Merged
merged 7 commits into from Mar 19, 2019
Merged

Connector Ref Updates #1278

merged 7 commits into from Mar 19, 2019

Conversation

darthtrevino
Copy link
Member

@darthtrevino darthtrevino commented Mar 18, 2019

  • Documentation updates
  • Update the connector ref mechanism so we provide a function that creates refs instead of creating refs aggressively. This will also allow us to pass options into the connector-ref functions
  • Update: I did not like how the new API was evolving, so I've pared this back to just allowing the connect function to accept a ref object.
function Box({dragSource}) {
  return <div ref={dragSource}>...</div>
}
export default DragSource(ItemTypes.Box, {/*...*/}, (connect, monitor) => ({
  dragSource: connect.dragSourceRef()
}));

@darthtrevino darthtrevino changed the title Add documentation describing the provided ref objects in the Connectors Connector Ref Updates Mar 18, 2019
@darthtrevino darthtrevino merged commit 786ef85 into master Mar 19, 2019
@darthtrevino darthtrevino deleted the docs/connector_refs branch March 19, 2019 18:13
darthtrevino added a commit that referenced this pull request Feb 3, 2022
* docs: add documentation about connector refs

* refactor: update the connector ref mechanism to use a function

* feat: allow options to be passed into connector-ref functions

* refactor: clean up createSourceConnector

* feat: udpate the connector api

* revert: pare back the connector APIs a bit, we'll start with just allowing ref arguments

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

Successfully merging this pull request may close these issues.

None yet

1 participant