9

ReacType 12.0 — Giving Context to Context

 2 years ago
source link: https://medium.com/@salsaluga/reactype-12-0-giving-context-to-context-9aa7d4cf06
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

ReacType 12.0 — Giving Context to Context

1*H-HKupEzNOcEmHtwqdQT5w.png

The mismanagement of Context API while using tools such as React — one of the most widely used front-end libraries in the industry — can create a breeding ground for bugs.

With React’s Context API, consuming different contexts while attempting to debug a large codebase is a nightmare-inducing situation that many developers are familiar with, as any components that are consuming a context are able to modify contexts at an application level. Using multiple contexts at multiple levels can interfere with the one-way data flow paradigm and can lead to the mismanagement of context data. This makes it difficult — namely in larger projects with multiple context providers — to follow which components are consuming top-level contexts, as well as provides a roadblock in tracking down contexts defined upwards within the tree of data when you are investigating bugs that lie in dependencies below.

For many developers, having an efficient and easily readable way to visually display and efficiently manage products with multiple top-level contexts would be a virtual life-raft during every portion of the development journey. ReacType, a powerful prototyping tool that allows users to create a new React project with the ability to dynamically visualize their application architecture throughout the creation process, is a must-have solution to this problem.

1*3H0WNQGdQgLlbJWWB53z4g.gif

Drag-and-Drop Canvas Feature

ReacType utilizes a drag-and-drop canvas display and a real-time and interactive code preview feature for easy creation, viewing, and management of components and contexts within a project. Each component has its own canvas, and within each component a user is able to select an HTML element (or create their own!) to drag-and-drop onto the canvas to build out the styling of that component of their application. When new instances are added to the canvas, the code attributed with that element or style attribute will dynamically generate in the code preview at the bottom of the application as a live demo.

1*IUh2lB7izi9VqYzTJ1VDRg.gif

Code Preview Feature

ReacType 12.0: Context Manager

The major feature of ReacType’s most recent version — ReacType 12.0 — is the context manager, an interactive context tree that serves as a context management and visualization tool in order to track, maintain, organize, and edit changes to our contexts from any children components residing below. The tree visually displays all components in relation to other contexts, giving you the ability to easily identify the providers and consumers of all contexts:

1*fbg4EULW8T9odQxGvGLdOA.gif

Context Tree Feature

Creating and editing contexts and their consumer components has become another easy task for the user via the use of the prototyping tool:

1*s8Vx6oKmp2iwNsa--OZT0g.gif

Creation and Editing Feature

Incorporation of context manager allows the user to also add context from the root component down to any selected children components:

1*rfUb1ozpC2Kb1HJqCgouyQ.gif

Assign Feature

After you have created and assigned contexts, you can easily export the current React project that will include all context files, along with the boilerplate code for root and children components:

1*FIjgl4wzWhLTvAiJuG-zYA.gif

Export Feature

ReacType is a tool that any developer can use to save one of their most precious commodities: time. The ability to quickly create, view, manage, and ultimately export boilerplate codebases within a singular, dynamic application for use elsewhere allows developers of all skill levels to allocate their time and energy elsewhere. The new context manager feature in ReacType 12.0 provides an easy-to-read management tool that updates in real time, and is of use to developers both new and experienced.

Want to Try it For Yourself?

If you’re interested in utilizing this dynamic prototyping tool, you can download ReacType on ourGithubpage or by visiting our website, where you will find more information about the variety of features that ReacType has to offer to developers of all skill levels.

If you have any concerns, bugs, or issues with ReacType, or you are interested in contributing, we would love to hear from you! Please feel free to reach out on the ReacType Githubpage.

ReacType 12.0 Contributors

Bianca Picasso: Github | LinkedIn

Huy Pham: Github | LinkedIn

Ken Bains: Github | LinkedIn

Salvatore Saluga: Github | LinkedIn


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK