Skip to content

Add a tags Proxy to Crank Core - #392

Open
zakarialaoui10 wants to merge 4 commits into
bikeshaving:mainfrom
zakaria-forks:main
Open

zakarialaoui10 wants to merge 4 commits into
bikeshaving:mainfrom
zakaria-forks:main

Conversation

@zakarialaoui10

Copy link
Copy Markdown

No description provided.

@brainkim brainkim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zakarialaoui10 Thank you for the PR and sorry for taking so long I’ve been busy with some other work. Also sorry for the random Claude spam.

I left some review. This PR isn’t likely to be merged without some tests.

I can work on this eventually if you wish. Let me know if you have any questions.

Comment thread package-lock.json Outdated
Comment thread src/crank.ts Outdated
Comment thread src/crank.ts Outdated
* function that forwards its arguments to `createElement`.
*/
export const tags = new Proxy(
{} as Record<

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use Object.create(null) as using an empty object will carry a bunch of object cruft.

Comment thread src/crank.ts Outdated
Use a null-prototype object for the dynamic tag cache and ignore
symbol properties and then to avoid prototype collisions

This branch has not been deployed

No deployments
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.

2 participants