Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Docs: add explicit deprecation notes to Entity methods #1787

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/APIReference-Entity.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ be used only for retrieval.

## Methods

### create
### create _(Deprecated in favour of [contentState.createEntity](/docs/api-reference-content-state.html#createentity))_

```
create(
Expand All @@ -70,7 +70,7 @@ are referenced by their string key in `ContentState`. The string value should
be used within `CharacterMetadata` objects to track the entity for annotated
characters.

### add
### add _(Deprecated in favour of [contentState.addEntity](/docs/api-reference-content-state.html#addentity))_

```
add(instance: DraftEntityInstance): string
Expand All @@ -83,15 +83,15 @@ created, and now need to be added to the `Entity` store. This may occur in cases
where a vanilla JavaScript representation of a `ContentState` is being revived
for editing.

### get
### get _(Deprecated in favour of [contentState.getEntity](/docs/api-reference-content-state.html#getentity))_

```
get(key: string): DraftEntityInstance
```
Returns the `DraftEntityInstance` for the specified key. Throws if no instance
exists for that key.

### mergeData
### mergeData _(Deprecated in favour of [contentState.mergeEntityData](/docs/api-reference-content-state.html#mergeentitydata))_

```
mergeData(
Expand All @@ -104,7 +104,7 @@ metadata through typical mutative means.

The `mergeData` method allows you to apply updates to the specified entity.

### replaceData
### replaceData _(Deprecated in favour of [contentState.replaceEntityData](/docs/api-reference-content-state.html#replaceentitydata))_

```
replaceData(
Expand Down